Java Client Silent Installation
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:

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

where
Example 1

Suppose the Java installer is jre-7-windows-i586.exe and you want to install the following configuration:
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:
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.

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, 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 Disqus system.

Labels: ,