11. Processes

Overview

In this chapter, we will quickly look at how Java handles processes. You will start by exploring the Runtime and ProcessBuilder classes, their functions, and how to launch them, in order to then create a process from either class. You'll then learn to send and receive data between parent and child, and how to store the outcomes of a process in a file. In this chapter's final activity, you will use these skills to create a parent process which will launch a child that will print an outcome (then captured by the parent) to the terminal.

Introduction

The java.lang.Process class is used to look for information about, and launch, runtime processes. If you want to understand how the Process class works, you can start by ...

Get The Java Workshop 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.