Launching Java programs from Java programs

Status
You're currently viewing only gumbo's posts. Click here to go back to viewing the entire thread.
Not open for further replies.

gumbo

Ars Tribunus Angusticlavius
6,107
IIRC the Process class returned from exec allows you to get the console IO streams. For example, if the console buffer is filled while a program runs, you must capture the input stream and handle it, or your program is not guarenteed to finish to completion.

Edit: Yep. ;)

Code:
Process p = Runtime.exec(ecec string);
InputStream is = p.getInputStream();

Edit 2: JJJ - If you are on a Windows system (and perhaps a *nix system), then redirecting from a file will not catch the System.err output.

gubmo

[This message was edited by gubmo on April 11, 2002 at 19:08.]
 
Status
You're currently viewing only gumbo's posts. Click here to go back to viewing the entire thread.
Not open for further replies.