Java Client Silent Installation

java logo

In some of our previous guides we have shown you how to extract the MSI and CAB files for the easy deployment of Java. Well, it seems that this method no longer works with the newer versions of Java so we thought we would update you with how to install Java silently with all the options that go with it.

To do this, you will need to use the Offline Installer that Java supply and then add on the parameters that you require for your own environment. Below you will find the download link for getting the offline installer and also the parameters, switches and examples for a Java silent install.



The Java Windows offline installer command has following syntax:

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 Filesjavajre (default location).
  • STATIC=1, if used, specifies a 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.
  • 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).

Example 1

Suppose the Java 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:

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 javajre
  • Have all features of the JRE installed

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

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

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.

The following is an example for installation:

The above command causes the log to be written to the setup.log file, this is our personal favourite and we have the log file point to a server share so that we can keep an eye on any failed log file installations.

COMMENTS

If you have any questions or comments on this guide, then please feel free to leave a message below using our comments section.



Leave us a message...