The jinfo
command-line utility gets 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.
The release of JDK 8 introduced Java Mission Control, Java Flight Recorder, and jcmd
utility for diagnosing problems with JVM and Java applications. It is suggested to use the latest utility, jcmd
instead of the previous jinfo
utility for enhanced diagnostics and reduced performance overhead.
The utility can also use the jsadebugd
daemon to query a process or core file on a remote machine. Note: The output takes longer to print in this case.
With the -flag
option, the utility can dynamically set, unset, or change the value of certain JVM flags for the specified Java process. See Java HotSpot VM Command-Line Options.
For more details on the jinfo
utility, see the jinfo
command man page.
The output for jinfo
utility for a Java Process with PID number 29620 as shown in Example 2-20.
The following topic describes troubleshooting technique with jinfo
utility.
If you start the target JVM with the -classpath
and -Xbootclasspath
arguments, the output from jinfo
provides the settings for java.class.path
and sun.boot.class.path
. This information might be needed when investigating class loader issues.
In addition to obtaining information from a process, the jinfo
tool can use a core file as input. On Oracle Solaris operating system, for example, the gcore
utility can be used to get a core file of the process in the preceding example. The core file will be named core.29620
and will be generated in the working directory of the process. The path to the Java executable and the core file must be specified as arguments to the jinfo
utility, as shown in Example 2-21.
Sometimes the binary name will not be java
. This occurs when the VM is created using the JNI invocation API. The jinfo
tool requires the binary from which the core file was generated.