You can use a configuration file to standardize JDK and JRE installations and specify options that are not available on the command line. An installer configuration file is an alternative to, and extension of, options specified on the installer command line.
Note: Windows, macOS, Linux, and Solaris command-line installers support the configuration file, but not every operating system supports all configuration file options.
This page has these sections:
If you are installing the JRE or JDK on Windows, use the INSTALLCFG
command-line option to specify a configuration file:
installer
INSTALLCFG=
configuration_file_path
installer
is the installer base file name, for example, jre-8u211-windows-x64.exe
or jdk-8u211-windows-x64.exe
.
configuration_file_path
is the path to the configuration file.
If you are installing the JRE or JDK on Solaris, Linux, or macOS, create a configuration file name named /etc/java/config/jre-install.properties
. When you launch the JRE or JDK installer, it looks for a configuration file with this specific path and name.
The following table lists the installer configuration file options that apply for each operating system.
Note:
|
Table 20-1 Configuration File Options
Option | Operating Systems | Supported Windows Installer (EXE or MSI) | JDK or JRE | Value or values | Description | Default Value | Used in the configuration file | Used on the command line | Saved in Runtime Configuration File? |
---|---|---|---|---|---|---|---|---|---|
DEPLOYMENT_RULE_SET= |
Windows | EXE, MSI | JDK, JRE | path | Specifies the path and file name of your organization's deployment rule set. See Deployment Rule Set in Java Platform, Standard Edition Deployment Guide. | none | yes | yes | yes |
EULA= |
Windows | EXE, MSI | JRE | 1 , 0 |
When EULA=1 is set, the installer prompts the user to accept the end-user license
agreement (EULA) if a Java applet or Java Web Start application is launched. |
0 |
yes | yes | yes |
INSTALL_SILENT= |
Windows | EXE | JDK, JRE | 1 , 0 |
When INSTALL_SILENT=1 is set, the installer performs a silent (non-interactive) installation. |
0 |
yes | yes | no |
INSTALLDIR= |
Windows | EXE, MSI | JRE | path |
Specifies the folder or directory into which the files are installed.
By default, the 32-bit version of the JRE is installed in
Similarly, by default, the 64-bit version of the JRE is installed in
Note: Linux and Solaris use operating system tools for this
purpose, and installation directory relocation will be handled by operating
system tools (for example: |
Operating system default path | yes | yes | no |
INSTALLDIRPUBJRE= |
Windows | EXE | JDK | path | When installing the JDK, this option specifies the folder where the public
JRE is installed.
Note:
|
Operating system default path | yes | yes | no |
NOSTARTMENU= |
Windows | EXE, MSI | JDK, JRE | 1 , 0 |
When NOSTARTMENU=1 is set, the installer installs the JDK or JRE without setting up Java start-up items. |
0 |
yes | yes | no |
REBOOT= |
Windows | MSI | JRE | 1 , 0 |
When REBOOT=1 is set, the installer behaves as follows,
depending on its mode:
|
1 |
yes | yes | no |
REMOVEOUTOFDATEJRES= |
Windows | EXE | JRE | 1 , 0 |
Note: You must perform a silent install to use this option.
Enables uninstallation of existing out-of-date JREs during JRE install. By default, the installer leaves all out-of-date Java versions on the
system. Setting For example, running |
0 |
yes | yes | no |
RETAIN_ALL_VERSIONS= |
Windows | MSI | JRE | 1 , 0 |
Note:
When Note:
|
0 |
no | yes | no |
STATIC= |
Windows | MSI | JRE | 1 , 0 |
When STATIC=1 is set, the installer performs a static installation of
the JRE. This means that a manual upgrade or an automatic update performed
by the Java Auto Update feature leaves that JRE
installed. This option
ensures that vendors, who require a specific version of the JRE for their
product, can be certain that the JRE will not be overwritten by a newer version.
See the subsection Update in "Java Control Panel" in Java Platform, Standard Edition Deployment Guide for more information about the Java Auto Update feature. The junction |
0 |
no | yes | no |
USAGETRACKER_CFG= |
Windows | EXE, MSI | JDK, JRE | path | Specifies the path and file name of the Java Usage Tracker properties file. See Java Usage Tracker Guide. | none | yes | yes | yes |
WEB_ANALYTICS= |
Windows, macOS | EXE, MSI | JRE | 1 , 0 |
When WEB_ANALYTICS=1 is set, the installer sends
installation-related statistics to an Oracle server. |
1 |
yes | yes | yes |
WEB_JAVA= |
Windows, macOS, Linux, Solaris | EXE, MSI | JRE | 1 , 0 |
When WEB_JAVA=1 is set, the installer configures the installation so downloaded Java
applications are allowed to run in a web browser or by Java Web
Start. |
1 |
yes | yes | yes |
WEB_JAVA_SECURITY_LEVEL= |
Windows, macOS, Linux, Solaris | EXE, MSI | JRE | H (high), VH (very high) |
Configures the installation's security level for Java applications running in a browser or run with Java Web Start. | VH |
yes | yes | yes |
The following is a sample JRE configuration file for Windows. It specifies the following:
After installing the JDK or JRE with a configuration file, the installer saves the file (with a subset of options used during install) in one of the following locations in your computer, depending on your operating system:
Windows: Either Program Files\Common Files\Oracle\Java\java_settings.cfg
or Program Files (x86)\Common Files\Oracle\Java\java_settings.cfg
.
Solaris and Linux: /etc/Oracle/Java/java.settings.cfg
macOS: /Library/Application/Support/Oracle/Java/java.settings.cfg