Command Line Reference

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Introduction

Welcome to the Oracle JRockit JVM Command-Line Reference. This document lists and describes how to use the command-line options and system properties valid for use with Oracle JRockit JVM.

This Introduction includes information on the following subjects:

 


Introduction to Command-line Options

Command-line options, also called start-up commands or start-up options, are self-descripting tags that you enter either at the command line or include in start-up scripts for applications running on a JVM. These options are used to override the JVM’s default settings and otherwise define to the JVM how you want your application to run; for example, you can use the command-line option -Xmx to set the maximum heap size or use -XXnoCompaction to disable heap compaction after a garbage collection.

Command-line options can be either standard—that is, valid for any JVM regardless of manufacturer—or non-standard—particular to a specific brand of JVM. The options described in this reference manual are non-standard and apply only to JRockit JVM.

Standard Options

While a large volume of standard options for JVMs has been created, JRockit JVM does not recognize all of them. The standard options JRockit JVM accepts are listed in Table 1-1:

Table 1-1 Standard Options fro JVMs
Option (Alternate Usage)
Description
-agentlib
When used with a specified library (-agentlib:<libname>), loads a native agent library; for example:
  • -agentlib:hprof
  • -agentlib:jdwp=help
  • -agentlib:hprof=help
For more information, see JVMTI Agent Command Line Options.
-agentpath
When uses with a full pathname (-agentpath:<path-to-agent>), loads a native agent library by full pathname. For more information, see JVMTI Agent Command Line Options.
-client
Selects the JRockit JVM Client JVM.
-javaagent
Loads a Java programming language agent, see java.lang.instrument.
-jrockit
Selects the Oracle JRockit server JVM. This is equivalent to -server and is the default.
-version
Displays version information and then exits the application.
-showversion
Displays version information and continues the application run.
-verbose:<area>[,<area>]
For more information on how this option works, see -Xverbose.
-cp or -classpath
Specifies a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by semicolons (;) in Windows or colons (:) in Linux. Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.
-ea (-enableassertions)
Enables assertions, which are disabled by default. Depending upon the arguments included with the option, -ea (-enableassertions) will either simply enable assertions, enable assertions in the specified package and any subpackages, enable assertions in the unnamed package in the current working directory, or enable assertions in the specified class.
-da (-disableassertions)
Disables assertions. Depending upon the arguments included with the option, -da (-disableassertions) will either simply disable assertions, disable assertions in the specified package and any subpackages, disable assertions in the unnamed package in the current working directory, or disable assertions in the specified class.
-esa (-enablesystemassertions)
Enable asserts in all system classes by setting the default assertion status for system classes to true.
-dsa (-disablesystemassertions)
Disables asserts in all system classes.

For documentation on these standard command-line options, please refer to Standard Options in the Sun Microsystems document Java - The Java Application Launcher at:


http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/java.html#standard

JRockit JVM Non-standard Options

JRockit JVM uses a set of non-standard options to control JVM behavior. Since these options are non-standard, they will not work with other JVMs. If you attempt to use them with another JVM, you will either receive results that can be erroneous or create an error condition and receive no results at all. Conversely, JRockit JVM will not recognize another JVM’s non-standard options.

JRockit JVM’s non-standard options are divided into two groups:

Since all of the options described in this manual are non-standard, they are subject to change or deprecation at any time.

Other JRockit JVM Start-up Commands

Occasionally, you might encounter JRockit JVM internal properties set with the -D option. For example, you might see something that looks like this:

-Djrockit.lockprofiling=true

The -D option is used to set properties and their associated values, thus sending those parameters to Java programs. In the Oracle JRockit JVM, some of those parameters are read by the JVM and change how the JVM works. Because these -D properties are for internal use, they are not discussed in this reference manual; however, as their number and efficacy increase, such documentation might be added.

Case-sensitivity with Command-Line Options

As of Oracle JRockit JDK 5.0 R25, command-line options are no longer case-sensitive unless explicitly stated; however, for this guide, to ensure readability of the commands, “camel notation” is used to spell out a command (for example, -XgcPrio or -XXnoCompaction). Although you don’t have to use camel notation, if it makes the commands easier to read in the context of your code, you can still do so.

 


Introduction to System Properties

System properties define traits or attributes of the current working environment. When the Java application first starts up, the system properties are initialized with information about the runtime environment, including information about the current user, the current version of the Java runtime, and even the product vendor’s bug report URL.


  Back to Top       Previous  Next