Runtime.getRuntime().exec的错误
try {
Process proc = Runtime.getRuntime().exec("tmshutdown -y");
} catch (IOException e) {
e.printStackTrace();
}
执行报错
java.io.IOException: tmshutdown: cannot execute
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:137)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:275)
at java.lang.Runtime.exec(Runtime.java:195)
at java.lang.Runtime.exec(Runtime.java:152)
at com.yizhao.ucis.UcisServer.main(UcisServer.java:99)
为什么????