Home > Jamf Pro, Java, Mac administration, macOS, Scripting > Identifying vendors of installed Java JDKs using Jamf Pro

Identifying vendors of installed Java JDKs using Jamf Pro

Since Oracle’s license change for Java 11 and later took effect in October 2018, where Oracle announced that they would now be charging for the production use of Oracle’s Java 11 and later, the number of open source (and free) OpenJDK distributions has increased dramatically.

Before the license change, most Mac admins would only install Oracle Java on those Macs which needed Java. Now, the list of available vendors has broadened to include the following:

Note: There may be even more OpenJDK distributions available for macOS, but these are the ones I know of.

To help Jamf Pro admins keep track of which vendors’ Java distributions are installed on their Macs, I’ve written a Jamf Pro Extension Attribute to help identify them. For more details, please see below the jump.

This Jamf Pro Extension Attribute verifies if a Java JDK is installed. Once the presence of an installed JDK has been verified by checking the java_home environment variable, the JDK is checked for the vendor information. The EA will return one of the following values:

  • None
  • AdoptOpenJDK
  • Amazon
  • Apple
  • Azul
  • OpenJDK
  • Oracle
  • SAP
  • Unknown

The returned values indicate the following:

None = No Java JDK is installed.
AdoptOpenJDK = AdoptOpenJDK is the Java JDK vendor.
Amazon = Amazon is the Java JDK vendor.
Apple = Apple is the Java JDK vendor.
Azul = Azul is the Java JDK vendor.
OpenJDK = OpenJDK is the Java JDK vendor.
Oracle = Oracle is the Java JDK vendor.
SAP = SAP is the Java JDK vendor.
Unknown = There is a Java JDK installed, but it is not from one of the listed vendors.

The Extension Attribute is available below, and at the following address on GitHub:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/Casper_Extension_Attributes/java_jdk_vendor

  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 )

Connecting to %s

%d bloggers like this: