Package org.zeroturnaround.process
Class PidUtil
java.lang.Object
org.zeroturnaround.process.PidUtil
Helper methods for retrieving process IDs.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PidUtil
public PidUtil()
-
-
Method Details
-
getMyPid
public static int getMyPid()- Returns:
- process ID of the current JVM.
-
getPid
Detects PID from givenProcessobject. An error is thrown if we're unable to detect the PID.- Parameters:
process- process object (notnull).- Returns:
- detected PID (not
null).
-