Switching to OpenJ9

OpenJ9 provides the following tools, which might differ in behavior from the HotSpot equivalent.

Note: For information about HotSpot equivalences and differences for items other than tools, see New to OpenJ9?

Java diagnostic command tool (jcmd)

Runs diagnostic commands on a specified VM. The main difference from the HotSpot jcmd tool is that the following options are not currently supported:

  • The -f option to read commands from a file.
  • The Perfcounter.print option for displaying performance counters for the target VM.
  • Selecting VMs by main class instead of VMID.
  • Specifying 0 as a VMID to target all VMs.

Java memory map tool (jmap)

Displays information about classes on the heap, including the number of objects and their aggregate size. The main differences from the HotSpot jmap tool are as follows:

  • Uses the Attach API.
  • Displays information only for local processes that are owned by the current user, due to security considerations. You can display information for remote processes by using ssh user@host jmap <option> <vmid>, where <vmid> is the Attach API virtual machine identifier for the Java™ process.
  • Does not support displaying data from core dumps; use Dump viewer instead.
  • Does not include a -F option to force a dump of an unresponsive process. User kill -QUIT <pid> instead, where <pid> is the process identifier.

For more information, see jmap.

Java process status (jps)

Displays information about running Java processes. The main differences from the HotSpot jps tool are as follows:

  • Runs on Windows®, AIX®, and z/OS®, as well as Linux®.
  • Uses the Attach API.
  • Shows processes on the current host only.
  • There is no -V option.

For more information, see Java process status.

Java stack (jstack) tool

Displays information about Java stack traces and thread information for processes. The main differences from the HotSpot jstack tool are as follows:

  • In the interests of security, the OpenJ9 implementation of jstack prints only information about local processes that are owned by the current user.
  • Printing data for core dumps is not supported. Use the Dump viewer instead.
  • There is no -m option. Printing data for native stack frames is not supported.
  • There is no -F option to force a dump, although this might be accomplished using kill -QUIT <pid> on some platforms.

For more information, see jstack.