>>>>> "Urs" == Urs A Schroffenegger <[EMAIL PROTECTED]> writes:
Urs> if you want to execute shell commands, you can use the
These should be "to execute files". If you want to use shell builtins
or shell features like redirection you need a shell, e.g.:
Runtime.getRuntime().exec(new String[] {"/bin/sh",
"-c",
"ls / 2>&1 | tee ls.log"});
Urs> Runtime class (in java.lang.*), with the exec(String
Urs> command), it returns a new process executing the system
Urs> command specified, with the methods getInputStream() and
Urs> getOutputStream(), you can get the return of the program:
Juergen
--
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux.html
JVM'01: http://www.usenix.org/events/jvm01/
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]