Most of the command-line utilities described in this section are either included in the JDK or native operating system tools and utilities. Although the JDK command-line utilities are included in the JDK download, it is important to consider that they can be used to diagnose issues and monitor applications that are deployed with the Java Runtime Environment (JRE).
In general, the diagnostic tools and options use various mechanisms to obtain the information they report. The mechanisms are specific to the Virtual Machine (VM) implementation, operating systems, and release. Frequently, only a subset of the tools is applicable to a given issue at a particular time. Command-line options that are prefixed with -XX
are specific to Java HotSpot VM. For more information about command-line options used by Java HotSpot VM, see Java HotSpot VM Command-Line Options.
Note: The-XX options are not part of the Java API and can vary from one release to the next. |
The tools and options are divided into several categories, depending on the type of problem that you are troubleshooting. Certain tools and options might fall into more than one category.
Postmortem diagnostics. These tools and options can be used to diagnose a problem after an application has crashes. See Postmortem Diagnostics Tools.
Hung processes. These tools can be used to investigate a hung or deadlocked process. See Hung Processes Tools.
Monitoring. These tools can be used to monitor a running application. See Monitoring Tools.
Other. These tools and options can be used to help diagnose other issues. See Other Tools, Options, Variables and Properties.
Note: Some command-line utilities described in this section are experimental. Thejstack , jinfo , and jmap utilities are examples of utilities that are experimental. The jcmd is a new JDK profiling utility in JDK 8. It is suggested to use the latest diagnostic utility, jcmd instead of the earlier jstack , jinfo, and jmap utilities. |