分享

How do I arrange a silent (unattended) Java i...

 Wiley Library 2013-10-07

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


This article applies to:
  • Platform(s): Windows XP, Windows 2000, Windows 2003
  • Java version(s): 7.0

SYMPTOMS

  • System administrators want to deploy Java on multiple PCs on their Intranet without user interaction.
  • Developers require Java to be silently installed with their products.

SOLUTION

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

Command Line Install
The Java SE 7 Windows offline installer command has following syntax:

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

where

  • <jre>.exe is the single executable installer for Java
  • /s, if used, indicates 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. This option is available in the 6u10 release and above. For more information see Static Installation.
  • 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 Security Levels of the Java Client..
  • 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 V (very high), H (high), M (medium, the default) or L (low). This field is available as of the 7u10 release.
Installation Configurations
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
Log file can be used to verify if an installation succeeded. To create a log file describing the installation append /L C:\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-7-windows-i586.exe /s /L C:\setup.log
The above command causes the log to be written to the setup.log file.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多