2 Use an Installer Configuration File to Install the JRE

When installing the Java Runtime Environment (JRE) from the command line, you can use an installer configuration file to supplement the JDK command-line installation options.

Note:

The MSI Enterprise JRE Installer is available as part of Oracle Java SE Subscriptions and other legacy products (such as Oracle Java SE Advanced or Oracle Java SE Suite), and is only available to customers for download through My Oracle Support (MOS).

An installer configuration file is an alternative to and extension of options specified on the installer’s command line. You can use this configuration file to standardize installations and to specify options that are not available on the command line.

This section includes the following topics:

Installer Configuration File Options

The following table lists all of the installer configuration file options.

Note:

You can substitute Enable for 1 and Disable for 0.

With the exception of AUTO_UPDATE and STATIC, you can use these options when running the MSI Enterprise JRE Installer from the command line. See Installing the JRE from the Command Line.

Table 2-1 Configuration File Options

Option Values Description

AUTO_UPDATE=

Enable, Disable

Enables the auto update feature.

Default: Enable

Note:

This option is not available for the MSI Enterprise JRE Installer.

DEPLOYMENT_RULE_SET=

path

Specifies the path and file name of your organization's deployment rule set. See Deployment Rule Set in the Java Platform, Standard Edition Deployment Guide.

EULA=

Enable, Disable

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

Default: Disable

INSTALL_DIR=

path

Folder or directory into which the files are installed.

The default install directory for Java is:

%ProgramFiles%\Java\jre$version
For Windows, this only works for the first-time installation of a family. Linux and Solaris use operating system tools for this purpose and the installation directory relocation is handled by operating system tools. For example:
rpm --prefix=path

NOSTARTMENU=

Enable, Disable

Specifies that the installer installs the JRE without setting up Java start-up items.

Default: Disable

REMOVEOLDERJRES=

0, 1

Applicable to Enterprise MSI only.

Enables uninstallation of all existing JREs on the system during JRE installation. The REMOVEOLDERJRES option does not remove static JRE installations.

Using REMOVEOLDERJRES=0 leaves all Java versions on the system. Using REMOVEOLDERJRES=1 removes all existing non-statically installed Java versions from the system.

For example, running

msiexec /i jreversion-number.msi REMOVEOLDERJRES=1
removes all of the existing non-statically installed JREs from the system.

Note:

If you are running the Java 7 enterprise MSI with the REMOVEOLDERJRES argument, it might leave non-enterprise MSI's behind under certain conditions. To ensure that all older Java 7 non-enterprise versions are removed, we recommend running the following two commands first:
  • msiexec /x {57BDA5C6-443C-4D65-B233-2823932170FF} /qn
  • msiexec /x {57BDA5C6-443C-4D65-B233-2823964170FF} /qn

REMOVEOUTOFDATEJRES=

0, 1

Applicable to online and offline installers.

Used to uninstall any existing out-of-date Java versions during JRE install. This flag will work with the JRE installer executable in the silent mode.

For example, running

msiexec /i jreversion-number.msi REMOVEOUTOFDATEJRES=1

removes all of the insecure JREs. JREs above the security baseline will not be uninstalled

Note:

Use the REMOVEOUTOFDATEJRES option in place of attempting to use modifyremove support.

REBOOT=

Enable, Disable

If disabled, then the installer never prompts 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

STATIC=

Enable, Disable

Performs a static installation (see Performing a Static Installation of the JRE).

Default: Disable

Note:

This option is not available for the MSI Enterprise JRE Installer.

USAGETRACKER_CFG=

path

Specifies the path and file name of the Java Usage Tracker properties file.

WEB_ANALYTICS=

Enable, Disable

Allows or disallows the installer to send installation-related statistics to an Oracle server.

Default: Enable

WEB_JAVA_SECURITY_LEVEL=

H (high), VH (very high)

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

Default: H

WEB_JAVA=

Enable, Disable

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

Default: Enable

Example of an Installer Configuration File

You an use the example of an installer configuration file to create your own configuration files for Windows.

The following is an example of an installer 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 2-1 Example of an Installer Configuration File for Windows

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

System Runtime Configuration File

After installing the JRE, the installer creates the system runtime configuration file.

In JDK 6, after using an installer configuration file to install the JRE, the installer saves it as a system runtime configuration file in %ALLUSERSPROFILE%\Oracle\Java\java_settings.cfg.

In JDK 8 and above, after using an installer configuration file to install the JRE, the installer saves it as a system runtime configuration file in C:\Program Files (x86)\Common Files\Oracle\Java\java_settings.cfg

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