jdk.jcmd/sun.tools.jinfo.JInfo - "jinfo" Command

Q

How to run "jinfo" command from JDK lib\modules JImage file?

✍: FYIcenter

A

"jinfo" command allows you to get configuration information from a running Java process or crash dump and prints the system properties or the command-line flags that were used to start the JVM.

"jinfo" command is supported by the jmods\jdk.jcmd.jmod module file, which is also linked into the lib\modules JImage file in JDK 9, 10, and 11.

You can run the "jinfo" command using the lib\modules JImage file as described below using JDK 11 as an example:

C:\fyicenter>set JDK_HOME=\fyicenter\jdk-11.0.1

C:\fyicenter>%JDK_HOME%\bin\java --module jdk.jcmd/sun.tools.jinfo.JInfo

Usage:
    jinfo <option> <pid>
       (to connect to a running process)

where <option> is one of:
    -flag <name>         to print the value of the named VM flag
    -flag [+|-]<name>    to enable or disable the named VM flag
    -flag <name>=<value> to set the named VM flag to the given value
    -flags               to print VM flags
    -sysprops            to print Java system properties
    <no option>          to print both VM flags and system properties
    -? | -h | --help | -help to print this help message

 

jdk.jcmd/sun.tools.jmap.JMap - "jmap" Command

jdk.jcmd/sun.tools.jcmd.JCmd - "jcmd" Command

Tools Supported from JDK 9+ lib\modules JImage

⇑⇑ FAQ for JDK (Java Development Kit)

2019-08-23, 249👍, 0💬