Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Runtime.exec child Process not separate?
Runtime.exec child Process not separate? [message #12408] Fri, 02 May 2003 20:13 Go to next message
Eclipse UserFriend
Originally posted by: sherbert.RigakuMSC.com

Here is my code:

import java.io.IOException;

public class Test {

public static void main(String[] args) {
System.out.println("test begin");
Runtime rt = Runtime.getRuntime();
try {
String[] cmdArray = new String[]{
"cmd", "/c", "start \"Test Console\" echo Hello"
};
Process p = rt.exec(cmdArray);
}
catch (IOException e) {
System.err.println("exception caught: "+e);
}
System.out.println("test end");
}
}

When I run this simple application from inside Eclipse, the application's
life span is at most 2 seconds. The problem is that the Eclipse debugger
thinks my application is still running until I close the command console.
The command console was launched as a separate process and should not even
have any hooks into the JVM. If you are on Windows you can try this and see
what I'm talking about. This is causing me serious grief. When I use
Runtime.exec I expect to start a completely separate process. How and why
does Eclipse even know about this process?
Re: Runtime.exec child Process not separate? [message #12920 is a reply to message #12408] Sat, 03 May 2003 14:47 Go to previous message
Eclipse UserFriend
Originally posted by: jared-eclipse.mn.rr.com

S Sherbert wrote:
> When I run this simple application from inside Eclipse, the application's
> life span is at most 2 seconds. The problem is that the Eclipse debugger
> thinks my application is still running until I close the command console.

Why is this a problem?

- Jared
Previous Topic:Problem with Eclipse 2.1 and JDK 1.4.1_02
Next Topic:Can't get Ant to accpet ecllipse variables as arguments
Goto Forum:
  


Current Time: Sat Jul 27 16:29:58 GMT 2024

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

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

Back to the top