java程序调用bat文件,运行后无反应,不报错也不出结果,高手来看看
private void Run (){
Runtime rt = Runtime.getRuntime();
String filepath = "D:\\test.bat";
try {
rt.exec("cmd /c start" + "' '" + filepath);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
test.bat
echo ■test
call test.exe 5 4
为什么啊?
Runtime rt = Runtime.getRuntime();
String filepath = "D:\\test.bat";
try {
rt.exec("cmd /c start" + "' '" + filepath);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
test.bat
echo ■test
call test.exe 5 4
为什么啊?
...全文


Web 开发
