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.

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.

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

Contents    Previous    Next

Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved.