Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I NOT wait for Runtime.exec()

710081Sep 27 2007 — edited Sep 27 2007
I have the following code.

String line = "cmd /c " + command;
System.out.println(line);
Process p = Runtime.getRuntime().exec(line);

How can I make it to close after executing the line.
For example I open a picture like that "cmd /c file.jpg" then my program
waits for me to close the program that displays the picture the closes.

How can I make it to not wait for that application to close?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 25 2007
Added on Sep 27 2007
5 comments
387 views