Skip to main content
1-Visitor
April 22, 2022
Solved

Automatically stop auxiliary application after run in Java Free

  • April 22, 2022
  • 3 replies
  • 2414 views

Currently I run my code by clicking auxiliary application -> start, and after running I have to click stop.

Although this does not affect the functionality of my code even if I do not click stop, is there a way to stop the aux app somehow in the stop method? Just to save a click

 

public static void start () {
 do_something();
}
public static void stop () {
}

 

 

Best answer by sjuraj

try to run this via session.RunMacro()

 

~ Command `ProCmdUtilAux` ;
~ Select `aux_apps` `AppList` 1 `<name_of_your_app>`;
~ Activate `aux_apps` `StopBtn`;
~ Activate `aux_apps` `CloseBtn`;

 

from your application

3 replies

15-Moonstone
April 22, 2022

try to create macro and run it from your app to stop itself

17-Peridot
April 25, 2022

Take a look at pfcJLink.JLinkApplication.Stop

1-Visitor
April 26, 2022

This looks like what I'm looking for, although going through the API documentation I don't see how to call the currently running JLinkApplication object upon which to apply the stop method? Any chance that you have a code snippet for reference?

sjuraj15-MoonstoneAnswer
15-Moonstone
April 26, 2022

try to run this via session.RunMacro()

 

~ Command `ProCmdUtilAux` ;
~ Select `aux_apps` `AppList` 1 `<name_of_your_app>`;
~ Activate `aux_apps` `StopBtn`;
~ Activate `aux_apps` `CloseBtn`;

 

from your application

1-Visitor
April 27, 2022

works perfectly, thanks!