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 may substitute the value Enable for 1 and Disable for 0.

Table 2-1 Configuration Options

Option Values or 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= 1, 0 Y Y 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.

Default: 0

yes
INSTALLDIR= path Y Y Specifies the folder or directory into which the files are installed.
  • In JRE 8u421 and later, by default, the 32-bit version of the JRE is installed in C:\Program Files (x86)\Java\jreN, where N is the full Java SE release and update number. For example, N is 1.8.0_421 for JRE Release 8 Update 421.

    Similarly, by default, the 64-bit version of the JRE is installed in C:\Program Files\Java\jreN.

  • In releases between JRE 8u371 and JRE 8u411, the default installation directory is \Program Files\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. Note that the RETAIN_ALL_VERSIONS option has been deprecated in JRE 8u421.
no
NOSTARTMENU= 1, 0 Y Y When NOSTARTMENU=1 is set, the installer installs the JDK or JRE without setting up Java start-up items.

Default: 0

no
REBOOT= 1, 0 Y Y When REBOOT=1 is set, the installer behaves as follows, depending on its mode:
  • UI mode: After installing the JRE, the installer prompts you to restart your computer only if it detects that a reboot is required.
  • Silent mode: After installing the JRE, the installer automatically restarts your computer if it detects that a reboot is required.

Default: 1

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, 0 N Y

Note:

  • The option RETAIN_ALL_VERSIONS has been disabled in JRE 8u421. If you use this option, the installer ignores it and generates a warning. Set STATIC=1 instead to protect older JRE 8 versions from being uninstalled during a manual upgrade or an automatic update (see the subsection Update in "Java Control Panel" in Java Platform, Standard Edition Deployment Guide).
  • The JRE MSI installers for JRE 8u371 and later 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 releases between JRE 8u381 b32 and JRE 8u411 downloaded from My Oracle Support.

When RETAIN_ALL_VERSIONS=1 is set on the command line, it enables the installation of multiple JREs of the same family without removing other versions of JRE 8. The JRE MSI Installer installs JRE 8 in a directory named jre$fullversion directory instead of in the default jre-1.8 shared directory. For example, if RETAIN_ALL_VERSIONS=1 is set, then JRE 8u381 would be installed in a directory named jre1.8.0_381 instead of the default jre-1.8 shared directory.

Default: 0

Note:

  • INSTALLDIR cannot be set to Program Files\Java\jre-$family if RETAIN_ALL_VERSIONS=1 is set.
  • INSTALLDIR cannot be set to Program Files\Java\jre$fullversion if RETAIN_ALL_VERSIONS=0 is set.
no
STATIC= 1, 0 Y Y 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 JRE installer creates a junction, which acts like a shortcut or symbolic link to the latest installed JRE 8 version. There's a junction for both 32-bit and 64-bit versions of the JRE. See Default JRE Installation Directories in Java Platform, Standard Edition Installation Guide for the names of these junctions.

 
USAGETRACKER_CFG= path Y Y Specifies the path and file name of the Java Usage Tracker properties file. See Java Usage Tracker Guide. yes
WEB_ANALYTICS= 1, 0 Y Y

When WEB_ANALYTICS=1 is set, the installer sends installation-related statistics to an Oracle server.

Default: 1

yes
WEB_JAVA= 1, 0 Y Y

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.

Default: 1

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 (see 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:

  • Install the JRE in the directory C:\java\jre
  • Configure the JRE so that downloaded Java applications are not allowed to run in a web browser or by Java Web Start
INSTALLDIR=C:\java\jre 
WEB_JAVA=0

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

Table 2-1, Configuration Options, identifies which options and values are saved in the system runtime configuration file.