Home > Java, Mac OS X, macOS, Scripting > Automating Oracle Java 8 JDK updates

Automating Oracle Java 8 JDK updates

To go along with a previous post about automating Oracle Java 8 updates, I’ve now posted a script to download and install the latest Java 8 Java Development Kit (JDK) from Oracle. Oracle has been releasing two separate versions of Java 8 simultaneously, so this script is designed to allow the user to set which version they want to install: the CPU release or the PSU release.
The difference between CPU and PSU releases is as follows:

  • Critical Patch Update (CPU): contains both fixes to security vulnerabilities and critical bug fixes.
  • Patch Set Update (PSU): contains all the fixes in the corresponding CPU, plus additional fixes to non-critical problems.

For more details on the differences between CPU and PSU updates, please see the link below:

http://www.oracle.com/technetwork/java/javase/cpu-psu-explained-2331472.html

For more information, see below the jump.

The script below will download a disk image containing the latest version of the Java 8 JDK from Oracle and install the JDK using the installer package stored inside the downloaded disk image.

How the script works:

  1. Uses curl to download a disk image containing the latest Java 8 JDK installer from Oracle’s web site
  2. Renames the downloaded disk image to java_eight_jdk.dmg and stores it in /tmp
  3. Mounts the disk image silently in /tmp. The mounted disk image will not be visible to any logged-in user.
  4. Installs the latest Java 8 JDK using the installer package stored inside the disk image.
  5. After installation, unmounts the disk image and removes it from the Mac in question.

I’ve posted the script to my GitHub repo at the following address:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/install_latest_oracle_java_8_jdk

This script is also available as two separate payload-free installer packages, compressed and stored as .zip files inside the payload_free_installer directory:

  • payload_free_installer/install_latest_oracle_java_jdk_8_cpu_version – Installs the latest Oracle Java JDK 8 CPU version
  • payload_free_installer/install_latest_oracle_java_jdk_8_psu_version – Installs the latest Oracle Java JDK 8 PSU version
Categories: Java, Mac OS X, macOS, Scripting
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: