打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

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

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

IntroductionJava 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.
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
windows系统下JDK1.6环境变量配置
Apache Tomcat 8 (8.5.40)
Java Control Panel
How to implement a WiX installer upgrade
How Sysprep Works
Automate Your MSMQ Installation
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服