JDK5.0 has added Jstack, Jconsole, Jinfo, Jmap, Jdb, Jstat, JPS, and here's a brief introduction to these tools: Jstack-If the Java program crashes to generate core files, The Jstack tool can be used to obtain information about the Java stack and native stack of core files, making it easy to know how Java programs crash and where problems occur in the program. In addition, the Jstack tool can also be attached to a running Java program, seeing the Java stack and native stack of Java programs that were running, and jstack is useful if the Java program that is running now renders a hung state. This is only available in the Solaris and Linux JDK versions.
Jconsole–jconsole is a real-time graphical monitoring tool based on Java Management Extensions (JMX), which leverages the JMX instructions built into the JVM to provide real-time performance and resource monitoring, including the memory usage of Java programs , Heap size, the state of the thread, the allocation state of the class, and the space usage, and so on.
Jinfo–jinfo can know the configuration information of the crashed Java application from the core file, which is only available in the Solaris and Linux JDK versions.
Jmap–jmap can obtain a specific memory match from a core file or process, including heap size, Perm size, and so on, which is only available in the Solaris and Linux JDK versions.
JDB–JDB is used for real-time debugging of core files and running Java processes, which contains a wealth of commands to help you debug, and its functionality is very similar to the DBX in Sun Studio, but Jdb is specifically intended for use with Java applications.
Jstat–jstat leverages JVM-built directives to perform real-time command-line monitoring of the resources and performance of Java applications, including monitoring of heap size and garbage collection, and so on.
JPS–JPS is used to view the specific state of all processes within the JVM, including the process ID, the path to the process initiation, and so on.
In addition, there are some other accompanying tools not listed here, such as heap analysis Tool, kill-3 method, and so on, which before JDK5.0, are also very useful performance tuning tools, you can refer to the corresponding documentation to learn.