The Java Process API allows developers to create and manage native processes. You can now use the java.lang.ProcessBuilder from JDK 5 to create processes and redirect the output and error streams. The new interface java.lang.ProcessHandle in Java 9 allows you to control the native processes created by ProcessBuilder.start().
The ProcessHandle Interface
The fine-grained
control provided by
ProcessHandle
is very useful for long-running processes. Table 5-1 shows the methods of ProcessHandle. With the ProcessHandle interface, you can query the information about the native process and control its life cycle.
Table ...