Runtime.getRuntime().exec()执行lin
2020-07-10 本文已影响0人
cherishpf
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);