edost
Posts: 2
Nickname: edost
Registered: Nov, 2003
|
|
Re: Runtime.getRuntime.exec problem...
|
Posted: Nov 26, 2003 10:00 AM
|
|
Thx joe, now i am tring following code. My exe file returns value on standard output, i am tring to read this output through stream. it returns null in variable 'line' only when COMMAND contains any space(s) otherwise works fine. Suggest me on this.
String commandStr = "\"" + COMMAND + "\" " + options + " \"" + firstfile + "\" \"" + secondfile + "\"";
Process process = Runtime.getRuntime().exec(commandStr);
BufferedReader buffReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line = buffReader.readLine();
|
|