sun.tools.jstack.JStack - "jstack" Command

Q

How to run "jstack" command from JDK tools.jar file?

✍: FYIcenter

A

"jstack" command allows you to prints stack traces of Java threads for a given JVM process on your computer system.

"stack" command is supported by the lib\tools.jar JAR file JDK 1, 2, 3, 4, 5, 6, 7, and 8.

You can run the "jstack" command using the JDK tools.jar file as described below using JDK 8 as an example:

fyicenter> set JDK_HOME=\fyicenter\jdk-1.8.0_191

fyicenter> %JDK_HOME%\bin\java -cp %JDK_HOME%\lib\tools.jar sun.tools.jstack.JStack

Usage:
    jstack [-l] <pid>
        (to connect to running process)

Options:
    -l  long listing. Prints additional information about locks
    -h or -help to print this help message

 

sun.tools.jstatd.Jstatd - "jstatd" Command

sun.tools.jmap.JMap - "jmap" Command

Tools Supported from JDK 8- JAR Files

⇑⇑ FAQ for JDK (Java Development Kit)

2019-11-21, 2382🔥, 0💬