© Fu Cheng 2018
Fu ChengExploring Java 9https://doi.org/10.1007/978-1-4842-3330-6_5

5. The Process API

Fu Cheng
(1)
Auckland, New Zealand
 
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 ...

Get Exploring Java 9: Build Modularized Applications in Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.