Creazione msi per Java SE (Standard Edition) Runtime Environment 8 Update 181 (8u181)

Come indicato in nelle MSI Enterprise JRE Installer FAQ l’msi per il Java Runtime Environment è disponibile solo a pagamento l’alternativa gratuita è quella di utilizzare l’installazione manuale tramite exe:

The “MSI Enterprise JRE Installer”, or “Java MSI Installer”, allows system administrators to quickly and consistently roll out pre-configured Oracle JRE updates to Windows systems via automation tools. It is a commercial feature entitlement for Java SE Advanced and Java SE Advanced Desktop customers. The alternative to the Java MSI Installer is to use the public “exe” installer, which is designed for manual installation on one machine at a time.

Oracle fornisce l’msi solo se viene acquistata una licenza Java SE Advanced o Java SE Advanced Desktop per ogni desktop e ogni server su cui l’msi sarà installato, l’msi fornito garantisce la possibilità di gestite l’installazione automatizzata, la personalizzazione del package d’installazione e la possibilità del deploy tramite strumenti come Microsoft SCCM:

MSI stands for “Microsoft System Installer”, and has a consistent format to manage information normally entered manually, and allows the customization of installations through the use of transforms. System Administrators can then mass-install (or uninstall) these MSIs through desktop management systems like Microsoft SCCM.

The Java MSI Installer documentation appears at https://docs.oracle.com/javacomponents/msi-jre8/install-guide/ and provides information including a list of supported configurations. The Java MSI Installer is available to Java SE Advanced and Java SE Advanced Desktop licensees through My Oracle Support (MOS).

Please note that a Java SE Support entitlement alone does not permit use of the Java MSI installer. A Java SE Advanced or Java SE Advanced Desktop license is required for each desktop, and server the Java MSI installer will target.

WLS Enterprise customers are provided a Java SE Advanced entitlement, and may use the MSI to install on the systems where WLS runs, they cannot however deploy the MSI across unrelated systems without a separate Java SE Advanced or Java SE Advanced Desktop license.

The Java MSI installer is only available through MOS for licensees of Java SE Advanced and Java SE Advanced Desktop. There are Java MSI installers for JRE 7 update 95 and later, and JRE 8 update 20 and later. There is no MSI installer for JRE 6.

Sebbene sia possibile, come vedremo estrarre l’msi dall’exe, questo approccio non è supportato come non è supportato costruire l’msi, inoltre l’msi estratto è comunque differente da quello che viene fornito da Oracle ai titolari di licenze Java SE Advanced e Java SE Advanced Desktop. Infatti come indicato l’msi estratto dall’exe non ha la modalità Repair disponibile, non consente la configurazione di feature commerciali:

The public executable “exe” installers available from Java.com, OTN or MOS are intended for individual users who will manage their own installation. Some organizations may choose to manually build their own MSI package from scratch for internal use. These MSIs or and bundle derived from extracting the contents of the executable installers are not supported. Using executable installers in desktop management systems like Microsoft SCCM is not supported.

Some users may try to extract and modify the temporary MSI contained within the executable installer; this MSI is very different from the Java MSI Installer made available to Java SE Advanced and Java SE Advanced Desktop customers, and is not intended for enterprise use.

The Java MSI Installer available to Java SE Advanced and Java SE Advanced Desktop licensees is fully compliant with MS ICE standards and is designed to be run standalone, making it possible to deploy silently over frameworks such as SCCM and Active Directory. All MSI ‘Modes’ are supported: Install, Remove, Rollback and Repair along with Installer options and configuration of commercial features (e.g. UsageTracker).

The temporary MSI contained within the executable installer is not intended to be run standalone and its use in this way may cause issues. This is especially true as it relates to “FilesInUse”, and product registration when run silently, or over deployment frameworks. There is also no ‘Repair’ mode available, and it is not possible to configure some commercial features; moreover, the internal MSI format is designed for the executable and subject to change or removal at any time. Compatibility between systems may be problematic and any organization taking the time and effort to use this approach will need to carefully re-test their installation and uninstallation processes with every single update. Any issues encountered in this situation will not be covered by Support.

Tenute presenti le precedenti osservazioni nel caso si voglia estrarre l’msi dall’eseguibile è possibile utilizzare la seguente procedura che fa rifermento alla versione di Java SE (Standard Edition) Runtime Environment 8 Update 181 (8u181):

Passo 1: Download del package di installazione di Java SE (Standard Edition) Runtime Environment 8 Update 181 (8u181)

I file d’installazione d’installazione sono scaricabili dal seguente link Java SE Downloads in cui è possibile trovare l’ultima versione disponibile per Java SE (Standard Edition) Runtime Environment 8 ovvero la Java SE 8u181 – JRE e scaricare i seguenti package :

Passo 2: Avviare l’installazione senza completarla

Avviare l’installazione del package tramite un utente con privilegi amministrativi senza proseguire nel setup, ma rimanendo fermi nella dialog di benvenuto

Passo 3: Copiare l’msi dalla directory temporanea

Il setup estrae temporaneamente nel profilo dell’utente con cui è stato avviato il setup stesso, quindi è possibile copiare l’msi dalle seguenti cartelle:

  • Windows x64: %UserProfile%\AppData\LocalLow\Oracle\Java\jre1.8.0_181_x64
  • Windows x86: %UserProfile%\AppData\LocalLow\Oracle\Java\jre1.8.0_181

Passo 4: Annullare l’installazione

Dal momento che lo scopo dell’avvio del setup era quello di copiare l’msi dalla directory temporanea in cui viene estratto è possibile annullare l’installazione

Conclusioni

Tenuto presente di quanto indicato da Oracle circa il fatto che l’msi estratto dal setup non è supportato e differente da quello distribuito ai clienti titolari di licenza Java SE Advanced e Java SE Advanced Desktop occorre fare gli opportuni test prima di distribuire l’msi ottenuto in questo modo. Volendo è anche possibile automatizzare la procedura descritta precedentemente mediante uno script, è possibile scaricare un script di questo tipo dal mio repository su GitHub nella sezione dedicata agli scripts batch per Java in cui al momento ho resto disponibili seguenti: