JRE Installer Options

JDK Documentation

This section discusses options for installation of the Java Runtime Environment (JRE) on Windows 32-bit platform. It is intended for:

  • System Administrators deploying the Java JRE with Java Plug-in and Web Start technologies on multiple PCs in Intranet without user interaction.
  • Vendors having products requiring the JRE. The JRE can be silently installed with their product.

The Installation section has the following topics:

Introduction

Java™ SE Runtime Environment (JRE) installations are built using Microsoft Window Installer (MSI) 2.0 technology. MSI contains built-in support for silent or unattended installations. This document tells how to manually install the JRE using the .exe that launches the MSI installation.  The installer options are explained.

Command Line Install

In Java SE 6 The Windows offline installation command has the same syntax as the Windows Installation. The command is as follows:



	<jre>.exe   [/lang=<language ID>] [/s] 
            [IEXPLORER=1] [MOZILLA=1] [INSTALLDIR=<drive>:\<install_path>] [STATIC=1]

where

  • <jre>.exe is the single executable installer for the Java Runtime Environment (JRE)
  • /lang=<language ID>, if used, sets the localized language for the installer. For a complete list, please see Language IDs.
  • /s, if used, indicates silent installation
  • IEXPLORER=1, if used, indicates that the Plug-in should be registered as the default Java VM with the Internet Explorer browser
  • MOZILLA=1 indicates that the Plug-in should be registered with Mozilla 1.1 and later and Netscape browsers
  • INSTALLDIR, if used, specifies the drive and path of the installation
  • If INSTALLDIR is not specified, the installation will go into C:\Program Files\java\jre1.6.0 (default location).
  • STATIC=1, if used, specifies a static installation. This option is available in the 6u10 release and above. For more information on static install, please see Java Runtime Environment Configuration.

Note

The following options have been deprecated starting in release Java SE 6 update 10:

  • ADDLOCAL
  • IEXPLORE
  • MOZILLA
Beginning in Java SE 6 update 10 release, the latest JRE software will be registered with all browsers. This ensures that applets will run on the latest and most secure version of the JRE software. See JRE Installation Instructions for Java SE 6 update 10 release for more information about supported options.

Installation Configurations

Example 1

Suppose the JRE installer is jre-6-rc-windows-i586.exe and you want to install the following configuration:

  • Perform a Windows Installation
  • Install the JRE core, additional fonts, colors, and Soundbank
  • Register the Plug-in with Netscape 7 and Mozilla 1.3

The command to install the above mentioned configuration is as follows:

jre-6-rc-windows-i586.exe /s MOZILLA=1 

Example 2

Suppose the JRE installer is jre-6-rc-windows-i586.exe and you want to install the following configuration:

  • Perform a Windows Offline Installation and install the JRE on D drive at java\jre
  • Have all features of the JRE installed
  • Register the Plug-in with Internet Explorer

The command to install the above mentioned configuration is as follows:

jre-6-rc-windows-i586.exe /s IEXPLORER=1 INSTALLDIR=D:\java\jre

Note

To keep the MS-DOS window open, until the installation of JRE is complete use the start /w command as follows:

start /w jre-6-rc-windows-i586.exe /s MOZILLA=1

Creating a Log File

Log file can be used to verify if an installation succeeded. To create a log file describing the installation append /L C:\<path>setup.log to the install command and scroll to the end of the log file to verify.

Installation Example

The following is an example for installation:

jre-6-rc-windows-i586.exe /s /L C:\<path>setup.log

The above command causes the log to be written to the setup.log file.