Download java eBook


Notice that the API recommends that, as of version 1.5, the preferred way to create a Process is using ProcessBuilder.start().

Another important remark is that the exit value produced by waitFor is dependent from the program/script being executed. For instance, the exit codes produced by calc.exe are different from notepad.exe.

Related Examples


156 Contributors: 3
Wednesday, April 19, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial:

Download eBook