ProcessBuilder与Runtime.exec()的区别
Runtime.getRuntime().exec(...)
new Process(...).start()
.
Runtime
:
Process p = Runtime.getRuntime().exec(installation_path + uninstall_path + uninstall_command + uninstall_arguments);p.waitFor();
ProcessBuilder
:
Process p = (new ProcessBuilder(installation_path + uninstall_path + uninstall_command, uninstall_arguments)).start();p.waitFor();
waitFor
ProcessBuilder
?
撒科打诨
相关分类