Skip to main content



      Home
Home » Newcomers » Newcomers » Kill External Program Launched by Eclipse
Kill External Program Launched by Eclipse [message #939923] Thu, 11 October 2012 02:33 Go to next message
Eclipse UserFriend
Using the Eclipse articles
1) "http://eclipse.org/articles/Article-Launch-Framework/launch.html" and
2) "http://eclipse.org/articles/Article-Java-launch/launching-java.html" am able to launch an external program easily.

But my question is, are there any means of terminating or killing the launched external program using eclipse ...??

Thanks in advance

Regards,
Deepak P
Re: Kill External Program Launched by Eclipse [message #940660 is a reply to message #939923] Thu, 11 October 2012 17:28 Go to previous messageGo to next message
Eclipse UserFriend
It should be visible from the Debug view. You can use the toolbar buttons or context menu to Terminate a selected process.

http://help.eclipse.org/juno/topic/org.eclipse.jdt.doc.user/reference/views/debug/images/ref-debug_view.PNG

[Updated on: Thu, 11 October 2012 17:28] by Moderator

Re: Kill External Program Launched by Eclipse [message #940945 is a reply to message #940660] Fri, 12 October 2012 00:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi Nitin,
Thanks for the reply.

Let me say what i am trying to do in detail.

Basically I am developing an RCP. In that RCP I am trying to start an external program on a click of a button, say Button "Launch My External Program".

And there is another button say "Terminate My External Program". On the click of this button the external program that had been launched using the "Launch My External Program" button needs to be terminated.

And in the RCP the "Debug" View provided by the Eclipse is not included.
Thus the launch and termination needs to be done via the customized buttons/commands.

If you have a solution, please let me know


Regards,
Deepak
Re: Kill External Program Launched by Eclipse [message #945244 is a reply to message #940945] Mon, 15 October 2012 06:05 Go to previous messageGo to next message
Eclipse UserFriend
Found a workaround to terminate the externally launched program.

The below code launches the external program.

ILaunchConfiguration configuration = launchConfigurationWorkingCopy.doSave();

configuration.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());

Once this is done,
configuration.launch() API returns ILaunch.
ILaunch has an API as shown below.

launch.terminate()

By executing the above line, the corresponding externally started program can be terminated.

Regards,
Deepak P
Re: Kill External Program Launched by Eclipse [message #1638791 is a reply to message #945244] Fri, 27 February 2015 04:46 Go to previous message
Eclipse UserFriend
Facing another problem with ILaunchListener / ILaunchesListener2...
https://www.eclipse.org/forums/index.php/m/1638782/#msg_1638782

Please help.....
Previous Topic:How to rearrange toolbar buttons
Next Topic:JDBC does not connect
Goto Forum:
  


Current Time: Tue Jul 22 15:25:42 EDT 2025

Powered by FUDForum. Page generated in 0.09169 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top