2 Using a JRE MSI Installer Configuration File to Install the JRE

When installing the Java Runtime Environment (JRE) from the command line, you can use a configuration file to supplement the JRE MSI Installer command-line options.

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

This section includes the following topics:

JRE MSI Installer Configuration Options

The following table lists the JRE MSI Installer configuration options and identifies which can be used in a configuration file and which can be used on the command line.

Options listed in the following table that can be used to create a configuration file are flagged Y in the Used in Config File column. Options flagged Y in the Used in Command Line column can be used in the command line when running the JRE MSI Installer. The options that are not available on the command line can be specified in the configuration file. See Running the JRE MSI Installer.

Note:

You can substitute Enable for 1 and Disable for 0.

Table 2-1 Configuration Options

Option Values Used in Config File Used in Command Line Description Saved in Runtime Configuration File?

DEPLOYMENT_RULE_SET=

path

Y Y

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

yes

EULA=

Enable, Disable

Y Y

Prompts the user to accept the end-user license agreement (EULA) if a Java applet or Java Web Start application is launched.

Default: Disable

yes

INSTALLDIR=

path

N Y

Specifies the folder or directory into which the files are installed.

Note:

In 8u371 and later, the default installation directory changed to \ProgramFiles\Java\jre-$family (jre-1.8). Beginning with JRE 8u381 b32, use the RETAIN_ALL_VERSIONS=1 option to install later versions of an installed JRE family without removing preexisting JRE versions.
no

NOSTARTMENU=

Enable, Disable

Y Y

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

Default: Disable

no

REBOOT=

Enable, Disable

Y Y

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

Default: Enable

no
REMOVEOLDERJRES See Description See Description See Description

Note:

8u371 ended support for this option. The REMOVEOLDERJRES option is ignored beginning in 8u371. Customers that need to retain older JRE versions should use the RETAIN_ALL_VERSIONS option included in 8u381 b32 and later.

Before 8u371, using REMOVEOLDERJRES=1 enabled uninstalling all existing non-statically installed Java versions from a system during the installation of the JRE.
no
RETAIN_ALL_VERSIONS= 1 N Y

Note:

Added in 8u381 b32 and later. The JRE MSI installers for JRE 8u371 and later removed the default 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=1 option in the 8u381 b32 or later.

Enables the installation of multiple JREs of the same family without removing preexisting JRE versions.

When you set this option to 1, the JRE MSI Installer installs the JRE in a unique, version-specific directory without removing any other JREs that are part of the release 8 family. By default, the name of this directory is jre1.8.0_version, where version is the update number. For example, if you install JRE 8u381 with this option enabled, then the installer installs it in a directory named, by default, jre1.8.0_381.

In addition, if this option is enabled, the installer creates a registry that notifies the Java uninstall tool not to uninstall the JRE by default. When the out-of-date dialog is displayed, the option to uninstall the JRE will be deselected. See Uninstall Java Versions for more information.

By default, the installer installs the JRE in a directory named, by default, jre1.8 after first uninstalling any existing JREs that are part of the release 8 family.

no

USAGETRACKER_CFG=

path

Y Y

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

yes

WEB_ANALYTICS=

Enable, Disable

Y Y

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

Default: Enable

yes

WEB_JAVA=

Enable, Disable

Y Y

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

yes

WEB_JAVA_SECURITY_LEVEL=

H (high), VH (very high)

Y Y

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

Default: VH

yes

Creating a JRE MSI Installer Configuration File

A configuration file provides an alternative to setting options on command line when running the JRE MSI Installer.

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

  1. Either create a new file or open an existing configuration file in an ASCII text editor.
  2. Add or edit options in the configuration file. Refer to the Configuration Options table for available options.
  3. Save your configuration file as a text file in a directory of your choice.
  4. When you run the JRE MSI Installer (Running the JRE MSI Installer ), specify the path and file name of the configuration file in the JRE MSI Installer command.
The following example is a simple JRE MSI Installer configuration file for Windows. It specifies the following:
  • Installs the JRE in the directory C:\java\jre.
  • Sets the security level for unsigned Java applications running in a browser to very high.

    Example of a Simple JRE MSI Installer Configuration File
INSTALLDIR=C:\java\jre 
WEB_JAVA_SECURITY_LEVEL=VH

System Runtime Configuration File

After installing a newer build of a JRE 8 version, the JRE MSI Installer creates the system runtime configuration file.

After using a configuration file to install the JRE, the JRE MSI Installer saves it as a system runtime configuration file in C:\Program Files (x86)\Common Files\Oracle\Java\java_settings.cfg

The Configuration Options table identifies which options and values are saved in the system runtime configuration file.