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 | 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 | Enable , Disable |
Prompts the user to accept the end-user license agreement (EULA) if a Java applet or Java Web Start application is launched. | Disable |
yes | yes | yes |
INSTALL_SILENT= |
Windows | EXE | JDK, JRE | Enable , Disable |
Performs a silent (non-interactive) installation. | Disable |
yes | yes | no |
INSTALLDIR= |
Windows | EXE, MSI | JRE | path |
Specifies the folder or directory into which the files are installed.
Beginning with JRE 8u371, the default installation directory changed to
To specify a different install folder or directory, set the
Note: You cannot use the Beginning with JRE 8u381 b32, you can use the 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 | no | 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 | Enable , Disable |
Specifies that the installer installs the JDK or JRE without setting up Java start-up items. | Disable |
yes | yes | no |
REBOOT= |
Windows | MSI | JRE | Enable , Disable |
If disabled, the installer does not prompt you to restart your computer after installing the JRE. However, in most cases, the MSI Installer does not need to restart your computer after installing the JRE. | Enable |
yes | yes | no |
REMOVEOUTOFDATEJRES= |
Windows | EXE | JRE | 0 , 1 |
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. Using For example, running |
0 |
yes | yes | no |
RETAIN_ALL_VERSIONS= |
Windows | MSI | JRE | 0 , 1 |
Note: The JRE MSI installers for JRE 8u371 and JRE 8u381 GA
removed the ability to retain older JRE versions already installed on disk.
(The REMOVEOLDERJRES option was disabled in these versions.) Customers that
need to retain older JRE versions should use the RETAIN_ALL_VERSIONS option in
JRE 8u381 b32 or later releases downloaded from My Oracle Support.
When Note:
|
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 | Enable , Disable |
Enables or disables the installer to send installation-related statistics to an Oracle server. | Enable |
yes | yes | yes |
WEB_JAVA= |
Windows, macOS, Linux, Solaris | EXE, MSI | JRE | Enable , Disable |
Configures the installation so downloaded Java applications are, or are not, allowed to run in a web browser or by Java Web Start. | Enable |
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