This section provides a tutorial example on how to use the 'jinfo' tool to view the current value of a given HotSpot VM option.
The first JVM troubleshooting tool I want try is the "jinfo" tool.
The "jinfo" tool included in the Windows version of JDK 1.6 only supports functions
to view and modify HotSpot VM options of the specified JVM process.
Here is the "jinfo" command syntax:
C:\herong>\Progra~1\java\jdk1.6.0_02\bin\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 option
-flag [+|-]<name> to enable or disable the named VM option
-flag <name>=<value> to set the named VM option to the given value
-h | -help to print this help message
HotSpot VM supports many options as described on the
"Java HotSpot VM Options" page.
You can change the default value of any HotSpot VM option using the "-XX:..." command option
when running the "java" command.
Here is a tutorial example of how to use the "jinfo" tool get the current value of a given VM option: