What's the difference between Runtime.exec() and ProcessBuilder?

John Zukowski

JDK 5.0 added a new class, ProcessBuilder to do the equivalent of the exec() method of Runtime. In addition to running commands in forked off subprocesses, you can adjust environment variables and change the starting working directory with ProcessBuilder.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact