Skip to content

Standard command-line options

The Eclipse OpenJ9™ virtual machine supports the standard Java™ options that are common to all Java virtual machine implementations, including Oracle's HotSpot VM. Some of the common options supported are summarised in the following table:

Standard option name Purpose
-classpath:<resource_name>[:<resource_name>] Sets the search path for application classes and resources (directories and compressed or .jar files). cp can be used instead of classpath.
-help, -? Prints a usage message.
-fullversion Prints the build and version information for a VM
-showversion Prints product version and continues.
-verbose:<option>[,<option>] Enables verbose output. Options include class, dynload, gc, init, jni, sizes, stack, and module. (See Notes)
-version Prints the full build and version information a VM

Notes:

  • -verbose:class: Writes an entry to stderr for each class that is loaded.
  • -verbose:dynload: Writes detailed class information to stderr as each bootstrap class is loaded by the VM:
  • -verbose:gc: Provides verbose garbage collection information.
  • -verbose:init: Writes information to stderr describing VM initialization and termination.
  • -verbose:jni: Writes information to stderr describing the JNI services called by the application and VM.
  • -verbose:sizes: Writes information to stderr describing the active memory usage settings.
  • -verbose:stack: Writes information to stderr describing the Java and C stack usage for each thread.
  • -verbose:module: Start of content that applies to Java 11 (LTS) and later Writes information to stderr for each module that is loaded and unloaded.

For more information about standard options, see Oracle Java SE Standard Options

OpenJ9 extensions

OpenJ9 supports the following extension to the -verbose option:

  • -verbose:stacktrace : Writes either the module name or the Classloader name (with the code source location when available) to the end of each line of a Java stack trace.