Pre-General Availability: 2017-05-24


You use the jstack command to print Java stack traces of Java threads for a specified Java process, core file, or remote debug server. This command is experimental and unsupported.


jstack [options] pid

The command-line options. See Options for the jstack Command.


The process ID for which the stack trace is printed. The process must be a Java process. To get a list of Java processes running on a machine, use the jps command.


The jstack command prints Java stack traces of Java threads for a specified Java process or remote debug server. For each Java frame, the full class name, method name, byte code index (BCI), and line number, when available, are printed. C++ mangled names aren’t demangled. To demangle C++ names, the output of this command can be piped to c++filt. When the specified process is running on a 64-bit Java Virtual Machine, you might need to specify the -J-d64 option, for example: jstack -J-d64pid .


This command is unsupported and might not be available in future releases of the JDK. In Windows Systems where the dbgeng.dll file isn’tt present, Debugging Tools for Windows must be installed so these tools work. The PATH environment variable needs to contain the location of the jvm.dll that is used by the target process, or the location from which the coredump file was produced.

Options for the jstack Command


Long listing. Prints additional information about locks.

-h or —help

Prints a help message.