From: D-Man <ds...@ri...> - 2001-07-10 15:32:04
|
On Tue, Jul 10, 2001 at 03:44:54PM +0200, Kevin McNamee wrote: | OK, this works, but it just returns '0'. I guess this the return code from | the 'ls -al' command. Where is the actual output? Yep. That means that the command completed successfully (at least that's the convention on *nix). See http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Process.html. java.lang.Runtime.exec returns a java.lang.Process object to you. That Process object has methods getOutputStream() getInputStream() getErrorStream() exitValue() You are looking to getOutputStream from the Process. The waitFor method returns the exitValue. HTH, -D |