How to get a snapshot of information about Process API in Java 9?

Java 9 has improved Process API by including new methods and introduced new interfaces ProcessHandle and ProcessHandle.Info to get all the details regarding the process and its information.

ProcessHandle interface can identify and provide control of native processes. Each individual process can be monitored for liveness, listed its children, get information about the process, or destroys it. ProcessHandle.Info interface gives information snapshots about a process.


ProcessHandle.Info info()


public class ProcessSnapShotTest {
   public static void main(String[] args) {
      ProcessHandle currentProcessHandleImpl = ProcessHandle.current();
      // Process snapshot of the current running process with ProcessHandle.Info:
      ProcessHandle.Info processInfo =;

      System.out.println("nProcess snapshot of the current running process:");
      System.out.println("User : " + processInfo.user().get());
      System.out.println("Start Time : " + processInfo.startInstant().get());


Process snapshot of the current running process:
User : Tutorialspoint\User
Start Time : 2020-05-01T05:44:41.458Z