jstack [ option ] pid jstack [ option ] executable core jstack [ option ] [server-id@]remote-hostname-or-IP
Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
jstack prints Java stack traces of Java threads for a
given Java process or core file or a remote debug server. For
each Java frame, the full class name, method name, 'bci' (byte
code index) and line number, if available, are printed. With the
-m option, jstack prints both Java and native frames of all
threads along with the 'pc' (program counter). For each native
frame, the closest native symbol to 'pc', if available, is
printed. C++ mangled names are not demangled. To demangle C++
names, the output of this command may be piped to c++filt.
If the given process is running on a 64-bit VM, you may need to
specify the -J-d64 option, e.g.:
jstack -J-d64 -m pid
NOTE - This utility is unsupported and may or may not
be available in future versions of the JDK. In Windows Systems
where dbgeng.dll is not present, 'Debugging Tools For Windows'
needs to be installed to have these tools working. Also,
PATH
environment variable should contain the
location of jvm.dll
used by the target process or
the location from which the Crash Dump file was produced.
For example, set
PATH=<jdk>\jre\bin\client;%PATH%
Mixed mode stack trace, the -m option, does not work with the remote debug server.