Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » how to terminate an ILaunch (or IProcess) programmatically
how to terminate an ILaunch (or IProcess) programmatically [message #332479] Wed, 22 October 2008 02:55 Go to next message
nick tan is currently offline nick tanFriend
Messages: 56
Registered: July 2009
Member
Hi, all

Here I want to terminate an ILaunch programmatically, what can I do?

In fact I want to terminate a java process started by its parent java
process, that says, in my code below:

Process newProcess = Runtime.getRuntime().exec("java -cp ....");

here I want to terminate the subprocess "newProcess", I invoked
newProcess.destroy(), the sub java process still alive!

As I think that eclipse can terminate a java application via clicking the
terminate button on console view, so there must be some tricks!

Anybody can help me?

--
Thanks & Best Regards!
Nick
Re: how to terminate an ILaunch (or IProcess) programmatically [message #332480 is a reply to message #332479] Wed, 22 October 2008 08:56 Go to previous message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
Nick Tan wrote:
> here I want to terminate the subprocess "newProcess", I invoked
> newProcess.destroy(), the sub java process still alive!

From what I understand, Debug invokes destroy() tries to call
exitValue() a couple of times to wait for it to die.

Remy
Previous Topic:Project specific formatting - where are the settings stored?
Next Topic:Updates and restoreState
Goto Forum:
  


Current Time: Thu Dec 26 21:13:54 GMT 2024

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

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

Back to the top