-Xoptionsfile
Specifies a file that contains VM options and definitions.
The contents of the options file are recorded in the ENVINFO
section of a Java™ dump.
Syntax
-Xoptionsfile=<file_name>
- where
<file_name>
specifies a file that contains options that are processed as if they had been entered directly as command-line options.
Explanation
At startup, the VM automatically adds -Xoptionsfile=<path>/options.default
at the beginning of the command line, where <path>
is the path to the VM directory.
<path>
is the VM directory, as shown in Directory conventions.
<path>
is the <java_home>/lib
directory, where <java_home>
is the directory for your runtime environment.
The file options.default
can be updated with any options that you want to specify at run time.
The options file does not support these options:
-assert
-fullversion
-help
-showversion
-version
-Xcompressedrefs
-Xcheck:memory
-Xoptionsfile
-XshowSettings
Although you cannot use -Xoptionsfile
recursively within an options file, you can use -Xoptionsfile
multiple times on the same command line to load more than one options files.
Some options use quoted strings as parameters. Do not split quoted strings over multiple lines using the forward slash line continuation character (\). The Yen symbol (¥) is not supported as a line continuation character. For example, the following example is not valid in an options file:
-Xevents=vmstop,exec="cmd /c \
echo %pid has finished."
The following example is valid in an options file:
-Xevents=vmstop, \
exec="cmd /c echo %pid has finished."
Example
Here is an example of an options file:
#My options file
-X<option1>
-X<option2>=\
<value1>,\
<value2>
-D<sysprop1>=<value1>