Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » how to terminate an ILaunch (or IProcess) programmatically
how to terminate an ILaunch (or IProcess) programmatically [message #332479] Tue, 21 October 2008 22:55 Go to next message
Eclipse UserFriend
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 04:56 Go to previous message
Eclipse UserFriend
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: Wed Mar 12 00:00:03 EDT 2025

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

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

Back to the top