J#-执行DOS命令
ylbtech_java
package dos; public class MyDemo { public static void main(String args[]) { try { Runtime r = Runtime.getRuntime(); r.exec("cmd.exe /c start dir"); } catch(Exception e) { e.printStackTrace(); } } }
ylbtech_java
package dos; public class MyDemo { public static void main(String args[]) { try { Runtime r = Runtime.getRuntime(); r.exec("cmd.exe /c start dir"); } catch(Exception e) { e.printStackTrace(); } } }