IBM User Guide for Java V7 on Windows > Reference > Command-line options
Specifying command-line options
Although the command line is the traditional way to specify command-line options, you can pass options to the JVM in other ways.
Use only single or double quotation marks for command-line options when explicitly directed to do so for the option in question. Single and double quotation marks have different meanings on different platforms, operating systems, and shells. Do not use '-X<option>' or "-X<option>". Instead, you must use -X<option>. For example, do not use '-Xmx500m' and "-Xmx500m". Write this option as -Xmx500m.
These precedence rules (in descending order) apply to specifying options:
- Command line.
For example, java -X<option> MyClass
- A file containing a list of options, specified using the –Xoptionsfile option on the command line. For example, java -Xoptionsfile=myoptionfile.txt MyClass
In the options file, specify each option on a new line; you can use the '\' character as a continuation character if you want a single option to span multiple lines. Use the '#' character to define comment lines.
Although you cannot specify -classpath in an options file, you can specify -Djava.class.path=, which is equivalent. Setting -Djava.class.path= in an options file allows you to work around any platform limitations on command-line length when using long class paths.
. Here is an example of an options file:
#My options file -X<option1> -X<option2>=\ <value1>,\ <value2> -D<sysprop1>=<value1>- IBM_JAVA_OPTIONS environment variable. You can set command-line options using this environment variable. The options that you specify with this environment variable are added to the command line when a JVM starts in that environment.
For example, set IBM_JAVA_OPTIONS=-X<option1> -X<option2>=<value1>
Parent: Command-line options
Error 404 - Not Found Error 404 - Not Found
The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.