public static void main(String[] args) {
try {
ProcessBuilder processBuilder = new ProcessBuilder(
"./netbeans-7.0.1-ml-linux.sh", " --silent");
// ProcessBuilder("./netbeans-7.0.1-ml-linux.sh"," --silent"," -J-Dnb-base.jdk.location=/home/nayum/Documents/jdk1.6.0_23/jre");
Process process = processBuilder.start();
process.waitFor();
} catch (Exception e) {
System.out.println(e);
e.printStackTrace();
}
}
}
此代码在命令提示符下执行时,对于netbeans的静默安装工作正常,但在eclipse中执行时,其执行将终止。问题和解决方案是什么?