Home > Java, Mac administration, macOS, Scripting > Oracle Java 9 JDK and JRE installation scripts for macOS

Oracle Java 9 JDK and JRE installation scripts for macOS

Oracle has started to release Java 9 for macOS, so I’m posting a couple of scripts to download and install the following:

Oracle Java 9 JRE
Oracle Java 9 JDK

Oracle has been releasing two separate versions of Java 8 simultaneously and may do the same for Java 9, so these Java 9-focused scripts are 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, please see below the jump.

The scripts are available on GitHub via the links below:

Oracle Java 9 JDK: https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/install_latest_oracle_java_jdk_9
Oracle Java 9 JRE: https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/install_latest_oracle_java_jre_9

The scripts are also available as payload-free packages, compressed and stored as .zip files in the payload_free_package directory available via the links above.

Oracle Java 9 JDK script:

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

How the script works:

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

Oracle Java 9 JRE script:

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

How the script works:

  1. Verifies that the Mac is running a Java 9-compatible operating system
  2. Uses curl to download a disk image containing the latest Java 9 JRE installer from Oracle’s web site
  3. Renames the downloaded disk image to java_nine_jre.dmg and stores it in the /tmp directory.
  4. Mounts the disk image silently in the /tmp directory. The mounted disk image will not be visible to any logged-in user.
  5. Installs the latest Java 9 JRE using the installer package stored inside the disk image.
  6. After installation, unmounts the disk image and removes it from the Mac in question.

  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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s

%d bloggers like this: