Java.com

Download Help

Printable Version

How do I arrange a silent (unattended) Java installation?


This article applies to:
  • Platform(s): Windows 2008 Server, Windows 7, Windows 8, Windows Server 2012, Windows Vista, Windows XP
  • Java version(s): 7.0, 8.0

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

  • System administrators deploying the JRE with Java Plug-in and Java Web Start technologies on multiple PCs in their Intranet without user interaction.

  • Vendors having products requiring the JRE. The JRE can be silently (non-interactively from the command line) installed with their product.

JRE installers are built using Microsoft Window Installer (MSI) 2.0 technology. MSI contains built-in support for silent installations or unattended installations. This document explains how to manually install the JRE using the .exe file that runs the MSI.


Java 8

See Windows JRE 8 installer options (docs.oracle.com) for more information.

Command-Line Installation

This section describes the command-line options for the JRE Windows Offline Installer. Run the installer as follows:

jre [INSTALLCFG=configuration_file_path] [options]
  • jre refers to the JRE Windows Offline Installer base file name (for example, jre-8u05-windows-i586.exe).
  • INSTALLCFG=configuration_file_path specifies the path of the installer configuration file.
    See Installing With a Configuration File (docs.oracle.com) for more information.
  • options are options with specified values separated by spaces. Use the same options as listed in Table 20-1, Configuration File Options (docs.oracle.com). In addition, you may use the option /s for the JRE Windows Offline Installer to perform a silent installation.

Java 7

See JRE 7 Windows installer options (docs.oracle.com) for more information.

Command Line Install

The Java SE 7 Windows Offline Installer command has the following syntax:

<jre>.exe [/s] [INSTALLDIR=<drive>:\<JRE_install_path>] [STATIC=1] [WEB_JAVA=0/1] [WEB_JAVA_SECURITY_LEVEL=VH/H/M] [SPONSORS=0]

Note
  • <jre>.exe is the single executable installer for the JRE.
  • /s, if used, indicates a silent installation.
  • INSTALLDIR, if used, specifies the drive and path of the JRE. If INSTALLDIR is not specified, the installation will go into C:\Program Files\java\jre (default location).
  • STATIC=1, if used, specifies a static installation. For more information about static installations, see Static Installation in Patch-in-Place and Static JRE Installation (docs.oracle.com).
  • WEB_JAVA=0, if used, disables any Java application from running in the browser. WEB_JAVA=1, the default, enables Java applications in the browser. This field is available as of the 7u10 release. For more information, see Setting the Security Level of the Java Client (docs.oracle.com).
  • WEB_JAVA_SECURITY_LEVEL, if used, sets the security level of unsigned Java apps running in a browser. The possible values for this field are VH (very high), H (high, the default), or M (medium). This field is available as of the 7u10 release. For more information, see Setting the Security Level of the Java Client (docs.oracle.com).
  • SPONSORS=0, if used, entirely bypasses sponsor offers such as browser add-ons. This field is available as of the 7u55 release. Note that sponsor offers, and therefore this functionality, is only applicable to online 32 bit JRE installers and Auto Update mechanisms.
Example 1
Suppose the JRE installer is jre-7-windows-i586.exe and you want to install the following configuration:
  • Perform a Windows Installation
  • Install the JRE core, additional fonts, colors, and Soundbank

The command to install the above mentioned configuration is as follows:
jre-7-windows-i586.exe /s

Example 2
Suppose the JRE installer is jre-7-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

The command to install the above mentioned configuration is as follows:
jre-7-windows-i586.exe /s INSTALLDIR=D:\java\jre

Note: To keep the MS-DOS window open, until the installation of Java is complete use the start /w command as follows:
start /w jre-7-windows-i586.exe /s


Creating a Log File

Use a log file to verify that 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.

The following is an example of creating a log file:

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

This example causes the log to be written to the setup.log file.


You might also be interested in:





Find expert help on Java installation and setup

Select Language | About Java | Support | Developers
Privacy | Terms of Use | Trademarks | Disclaimer

Oracle