T
Timo Nentwig
final String cmd = "mycmd";
final Process proc = Runtime.getRuntime().exec( cmd );
final BufferedReader in = new BufferedReader(new
InputStreamReader( proc.getInputStream() ));
final StringBuffer buf = new StringBuffer();
for( String s; (s = in.readLine()) != null; )
buf.append( s );
System.out.println("done");
return buf.toString();
"done" is never printed and that is actually because the for loop never
terminates. in.readLine() apparently never does return null. I assume some
process termination problem or something.
Somebody having a clue on this?
Timo
final Process proc = Runtime.getRuntime().exec( cmd );
final BufferedReader in = new BufferedReader(new
InputStreamReader( proc.getInputStream() ));
final StringBuffer buf = new StringBuffer();
for( String s; (s = in.readLine()) != null; )
buf.append( s );
System.out.println("done");
return buf.toString();
"done" is never printed and that is actually because the for loop never
terminates. in.readLine() apparently never does return null. I assume some
process termination problem or something.
Somebody having a clue on this?
Timo