Java Language Tutorial:

Java Language Process

Remarks

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.

Java Language Process Examples:

Related Java Language Tutorial Topics:

Other Tutorial Topics:

This modified content is an extract of the original Stack Overflow Documentation released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow. This topic was created and modified by the Stack Ovedrflow Contributor.