【发布时间】:2013-06-19 13:47:13
【问题描述】:
我无法从我的 java 代码中调用 shell 脚本。 这是我的代码。谁能让我知道我在这里缺少什么。
protected boolean shellExecute() throws InterruptedException {
try {
Process p = Runtime.getRuntime().exec("/home/baibhav/try_scripts/javacall.sh");
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
}
【问题讨论】:
-
欢迎来到 StackOverflow。请准确告诉我们什么不起作用。有
Exception吗? -
粘贴到堆栈跟踪中。