Compile a full linux directory using Runtime ?
Hi!!
I'm trying to compile a full linux directory. I've tried:
String cmd ="javac dir/*.java" -d"+mydir+" -classpath"+myclasspath;
Runtime r = Runtime.getRuntime();
r.exec(cmd);
or
Runtime r = Runtime.getRuntime();
r.exec("/bin/sh -c \""+cmd+"\"");
or
Runtime r = Runtime.getRuntime();
r.exec("/bin/bash -c \""+cmd+"\"");
or
Process p = Runtime.getRuntime().exec(cmd);
or
Process p = Runtime.getRuntime().exec("/bin/sh -c \""+cmd+"\"");
or
Process p = Runtime.getRuntime().exec("/bin/bash -c \""+cmd+"\"");
any one of them runs. What am i doing bad ? Where is the failure ?
On Windows XP it runs ok with:
Process r = Runtime.getRuntime().exec("cmd /c"+cmd);
I need help, please.
Thanks and excuse my english
David.

