Runtime.exec child Process not separate? [message #12408] |
Fri, 02 May 2003 20:13 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.05325 seconds