Process API Updates Java 9 has come with the changes which will let you fetch the pid of a process. Following code shows how to get a pid with Java 9 getPid function internally call getProcessId0 with process’s handle to
Java 9 is expected in early 2016. Its always good to know upcoming features in advance so that we will ready to take advantage as soon as they are available. Full list of features targeted in this release can be found