jps tool
jps
(Java Virtual Machine Process Status Tool) is a small utility provided with the JDK to display information about all currently running JVM processes.
Basic Usage
Entering the jps
command in the command line will list the PIDs and simple descriptions of all Java processes that the current user has permission to access:
jps
Example output:
12345 Jps
67890 MyApp
13579 AnotherApp
The numbers listed are process IDs, followed by the corresponding Java application names.
Display More Detailed Information
Use the -v
option to display the startup parameters of each Java process:
jps -v
Example output:
12345 Jps -Dapplication.home=/usr/lib/jvm/java-8-openjdk-amd64
67890 MyApp -Xmx1024m
13579 AnotherApp -Xms512m -Xmx1024m
Display Class Names and Arguments
Use the -l
option to display the main class name or Jar file name of each Java process:
jps -l
Example output:
12345 sun.tools.jps.Jps
67890 com.example.MyApp
13579 /path/to/anotherapp.jar
Display Full Command Line
Use the -m
option to display the main class name and arguments of each Java process:
jps -m
Example output:
12345 Jps
67890 MyApp arg1 arg2
13579 AnotherApp config.xml
Display All Information
Use the -vm
combination option to display all detailed information, including class names, arguments, and JVM parameters:
jps -vml