Class Jps
java.lang.Object
com.sun.enterprise.universal.process.Jps
Run a native process with jps
-- get the pid for a running JVM
note: dropping in an implementation for jps is not hard.
- Author:
- bnevins
-
Method Summary
-
Method Details
-
main
-
getProcessTable
-
getPid
return the platform-specific process-id of a JVM- Parameters:
mainClassName- The main class - this is how we identify the right JVM. You can pass in a fully-qualified name or just the classname. E.g. com.sun.enterprise.glassfish.bootstrap.ASMain and ASMain work the same.- Returns:
- the process id if possible otherwise 0
-
isPid
public static final boolean isPid(int apid) Is this pid owned by a process?- Parameters:
apid- the pid of interest- Returns:
- whether there is a process running with that id
-