J
Jerome
Hi there,
I am trying to execute multiple unix commands in Java. i.e. cd into the
directory, newline, and enter a command to run something.
--In the terminal window
$ cd xx/xx/xx/xx/
$ runXX
-- The Java
String cmd = "/bash/sh cd/xx/xx/xx '\n' runXX";
Runtime rt1 = Runtime.getRuntime();
Process p1= rt1.exec("cmd");
My java compiles but does not work with the string I have.
Can anyone help.
Thanks in advance.
J.
I am trying to execute multiple unix commands in Java. i.e. cd into the
directory, newline, and enter a command to run something.
--In the terminal window
$ cd xx/xx/xx/xx/
$ runXX
-- The Java
String cmd = "/bash/sh cd/xx/xx/xx '\n' runXX";
Runtime rt1 = Runtime.getRuntime();
Process p1= rt1.exec("cmd");
My java compiles but does not work with the string I have.
Can anyone help.
Thanks in advance.
J.