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(); }
JAVA调用CMD命令
2021-11-02 02:23:42