Documentation Contents
Java Platform, Standard Edition Troubleshooting Guide
Contents    Previous    Next

2.15 The jps Utility

The jps utility lists every instrumented Java HotSpot VM for the current user on the target system. The utility is very useful in environments where the VM is embedded, that is; where it is started using the JNI Invocation API rather than the java launcher. In these environments, it is not always easy to recognize the Java processes in the process list.

For more details on the jps utility, see the jps command man page.

Example 2-26 demonstrates the usage of the jps utility.

Example 2-26 How to Use jps Utility

$ jps
16217 MyApplication
16342 jps

The utility lists the virtual machines for which the user has access rights. This is determined by access-control mechanisms specific to the operating system. On Oracle Solaris operating system, for example, if a non-root user executes the jps utility, then the output is a list of the virtual machines that were started with that user's uid.

In addition to listing the PID, the utility provides options to output the arguments passed to the application's main method, the complete list of VM arguments, and the full package name of the application's main class. The jps utility can also list processes on a remote system if the remote system is running the jstatd daemon.

If you are running several Java Web Start applications on a system, they tend to look the same, as shown in Example 2-27.

Example 2-27 Java Web Start Applications

$ jps
1271 jps
     1269 Main
     1190 Main

In this case, use jps -m to distinguish them, as shown in Example 2-28.

Example 2-28 Distinguish Java Web Start Applications with jps Utility

$ jps -m
1271 jps -m
     1269 Main
     1190 Main http://webbugs.sfbay/IncidentManager/incident.jnlp
Contents    Previous    Next

Oracle and/or its affiliates Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.
Contact Us