67,513
社区成员
发帖
与我相关
我的任务
分享
String cmd = “shell/kmeans.sh” + " " + "/shell" + " " + "kmeans.scala";
Runtime.getRuntime().exec(cmd).waitFor();
public class BadExecJavac2 {
public static void main(String args[]) {
try {
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("javac");
int exitVal = proc.waitFor();
System.out.println("Process exitValue: " + exitVal);
} catch (Throwable t) {
t.printStackTrace();
}
}
}
Runtime.getRuntime().exec(new String[] {"/bin/sh","-c","kmeans.sh /shell kmeans.scala
"},null,null);