Specifying Java options and system properties

You can specify Java™ options and system properties directly on the command line. You can also use an options file or an environment variable.

About this task

The sequence of the Java options on the command line defines which options take precedence during startup. Rightmost options have precedence over leftmost options. In the following example, the -Xjit option takes precedence:
java -Xint -Xjit myClass

Use one of more of the options that are shown in the procedure to customize your runtime environment.


  1. Specify options or system properties on the command line. For example:
    java -Dmysysprop1=tcpip -Dmysysprop2=wait -Xdisablejavadump MyJavaClass
  2. Create an environment variable that is called IBM_JAVA_OPTIONS containing the options. For example:
    set IBM_JAVA_OPTIONS="-Dmysysprop1=tcpip -Dmysysprop2=wait -Xdisablejavadump"
  3. Create a file that contains the options, and specify that file on the command line or in the IBM_JAVA_OPTIONS environment variable by using the -Xoptionsfile parameter. For more information about constructing this file, see -Xoptionsfile.