經過Runtime.getRuntime().exec()方法來調用shell,java虛擬機會克隆當前進程,若是太頻繁就消耗大量CPU和內存。 html
http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html java