.

 

Java is a big family (really ?)

Java JREs are made available through what Oracle calls “Families”: actual families would be 1.7 and 1.8, which are also referred to as Java 7 or Java 8 respectively.

 

Each updated package would have a specific version, such as 1.8.112.

.

 

Default installation folders:

.

For version 1.7, the default installation folder for 32 bits version is Program Files (x86)\Java\jre7. If you install version 1.7.51 on top of 1-7.45, the previous version will be entirely replaced by the newer one in the very same jre7 folder.

For actual version 1.8,  the default installation folder is Program Files (x86)\Java\jre1.8.0_111 and  if you install version 112 on top of this one, it will use its proper folder, jre1.8.0_112. This means that Installation of new versions of Java JRE do not fail anymore when Internet Explorer or Firefox are opened. Just need to be carefull when Uninstalling them though… !

 

Install modes: Normal vs Static

When you install a JRE by default it installs under “normal” mode.

You can alternatively install the JRE by specifying STATIC=1 on the command line, which would make the package Static, which means it won’t be removed if you update to a later version of the SAME Family.

While for version 7 you could detect if the installation was done as Static based on the folder path, this is no longer the case as version 8 uses full path for all types of installation (version 7 static would install not in JRE<n> folder but in JRE<version>, ie JRE1.7.0_45 for instance instead of JRE7)

You will need to check the registry:

HKLM\Software\Wow6432Node\Javasoft\Java Runtime Environment\1.7.0_045\MSI\

verify the Mode (S equals Static). If Mode is not set, then the install is standard.

This is also true for version 8, so do not think that since the installation folder is the one also used by static install, this becomes a static installation automatically. If you need a static install you need to specify it in the config file, ie STATIC=Enable.

.

Use of the Java Setup installer instead of -extracted- MSI

With the recent versions of the Java Jre (8.xx), Oracle has decided that you should not use the extracted Msi anymore for install and recommends to use the setup with a config file for the deployment.

.

Issues with the command line installer

 

The setup being a command line that spawns subprocesses, it is advisable to force your deployment script to wait for the setup to finish before it continues with other things. When using the Sccm application model for instance, the check for installation success would be made before it actually finishes and trow an error message.

 

Once your have created your config file, you need to refer to it by full path in order for the program to find it. This is particularly important with Sccm where you usually use relative paths. A better option might be to pass the arguments to the command line at launch instead of though a config file.

Removal and automatic removal of previous versions

When you install a higher version number of the Same Family on the same machine, the previous version will be replaced entirely.

You can install different families on the same machine without having the other family removed, ie upgrading 1.8.111 to 1.8.112 would remove 1.8.111 but not an exising 1.7.45 version for instance.

First note that there is no change concerning Static installs, those are not replaced during installation of more recent versions.

By default, the removal of previous versions is automatic and targets the versions to be removed based on a web page accessed during the installation. In an enterprise environment, though, you are most likely to use a system account or not have web access with the account running the installation, so the removal will not work.

You can use workarounds in order to detect which versions are installed and remove them before you install the latest version.

Note that since the installation will now use a separate folder for install in all situations, install failures will be minimized. You don’t need to stop Internet Explorer or Firefox in order to upgrade Java anymore.

 

Advertisements