java调用cmd并执行批处理(bat)文件
String commandText = "cmd /c start D:/index.html";
//String commandText = "cmd /c start osk";
try {
Runtime.getRuntime().exec(commandText);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
Runtime.getRuntime().exec(commandText);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
补充:软件开发 , Java ,