12 Installation of the JRE with a Configuration File

You can use a configuration file to standardize JRE installations and specify options that are not available on the command line.

This topic describes the configuration file that supplements JDK command-line installation options. An installer configuration file is an alternative to, and extension of, options specified on the installer command line.

Note:

Windows, macOS, and Linux command-line installers support the configuration file, but not every operating system supports all configuration file options.

Using a Configuration File

If you are installing the JRE on Windows, then use the INSTALLCFG command-line option to specify a configuration file:

jre INSTALLCFG=configuration_file_path

  • jre is the installer base file name, for example, jre-9.0.1_windows-x64_bin.exe.

  • configuration_file_path is the path to the configuration file.

If you are installing JRE on Solaris, Linux, or macOS, then create a configuration file with the name /etc/java/config/jre-install.properties. When you start the JRE installer, it looks for a configuration file with this specific path and name.

Configuration File Options

The Table lists the installer configuration file options that apply for each operating system.

Note:

Substitute the value of Enable to1 and the value Disable to 0.

Use the same options at the command line when running the JRE Windows Offline Installer. See JRE Command-Line Installation.

Table 12-1 Configuration File Options

Option Operating Systems Values Description JRE Offline Installer Saved in Runtime Config File
INSTALL_SILENT= Windows Enable, Disable

Silent (noninteractive) installation.

Default: Disable

Yes Yes
INSTALLDIR= Windows path

Folder/directory into which the files are installed.

Default: Operating system default path

For Windows, this will work only for first time installation. Linux and Solaris use operating system tools for this purpose and installation directory relocation will be handled by operating system tools (for example: rpm --prefix=path)]

Yes No
STATIC= Windows Enable, Disable

Perform a static installation (see JRE Static Installation).

Default: Disable

Yes No
AUTO_UPDATE=

Windows

macOS

Enable, Disable

Enable the auto update feature.

Default: Enable

Yes Yes
WEB_JAVA=

Windows

macOS

Linux

Enable, Disable

Configure the installation so downloaded Java applications are, or are not, allowed to run in a web browser or by Java Web Start.

Default: Enable

Yes No
WEB_JAVA_SECURITY_LEVEL=

Windows

macOS

Linux

H (high), VH (very high)

Configure the installation's security level for Java applications running in a browser or run with Java Web Start.

Default: H

Yes No
WEB_ANALYTICS= Windows Enable, Disable

Allow or disallow the installer to send installation-related statistics to an Oracle server.

Default: Enable

Yes Yes
EULA= Windows Enable, Disable

If a Java applet or Java Web Start application is launched, then prompt the user to accept the end-user license agreement (EULA).

Default: Disable

Yes Yes
REBOOT= Windows Enable, Disable

If disabled, then the installer will never prompt you to restart your computer after installing the JRE. However, in most cases, the installer does not need to restart your computer after installing the JRE.

Default: Enable

Yes No
NOSTARTMENU= Windows Enable, Disable

Specify that the installer installs the JRE without setting up Java startup items.

Default: Disable

Yes No
REMOVEOUTOFDATEJRES= Windows 0, 1

NOTE: Applicable to online and offline installers only (.exes and wrappers). Enables uninstallation of existing out-of-date JREs during the JRE installation.

Using REMOVEOUTOFDATEJRES=0 leaves all out-of-date Java versions on the system.

Using REMOVEOUTOFDATEJRES=1 removes all out-of-date Java versions from the system.

For example, running jre–9.1.1.1.exe /s REMOVEOUTOFDATEJRES=1 removes all JREs below the security baseline. JREs above the security baseline are not uninstalled.

Yes No

Sample Configuration File

The following is a sample configuration file for Windows. It specifies the following:

  • Perform a silent installation.

  • Install the JRE in the directory C:\java\jre.

  • Set the security level for unsigned Java applications running in a browser to very high.

Example 12-1 Sample Configuration File for Windows

INSTALL_SILENT=Enable
INSTALLDIR=C:\java\jre
WEB_JAVA_SECURITY_LEVEL=VH

System Runtime Configuration File

After installing the JRE with a configuration file, the installer saves the file (with a subset of options used during installation) in one of the following locations in your computer, depending on your operating system:

  • Windows: %ALLUSERSPROFILE%\Oracle\Java\java.settings.cfg

    The value of the environment variable %ALLUSERSPROFILE% is typically C:\ProgramData.

  • Solaris and Linux: /etc/Oracle/Java/java.settings.cfg

  • macOS: /Library/Application/Support/Oracle/Java/java.settings.cfg