Linux下:
String[] command = { "/bin/sh", "-c", cmmd };
Process ps = Runtime.getRuntime().exec(command);
Windows下:
String[] command = { "cmd.exe", "/c", cmmd };
Process ps = Runtime.getRuntime().exec(command);
Linux下:
String[] command = { "/bin/sh", "-c", cmmd };
Process ps = Runtime.getRuntime().exec(command);
Windows下:
String[] command = { "cmd.exe", "/c", cmmd };
Process ps = Runtime.getRuntime().exec(command);
本文标题:Runtime.getRuntime().exec()执行lin
本文链接:https://www.haomeiwen.com/subject/wbwmcktx.html
网友评论