Java SE Development Kit 8 (CPU) (Java SE Development Kit 8 (CPU)) has an extension attribute requiring attention

mucgyver-old
New Contributor III

Hello.

I recently got an error notification in Jamf stating:

"Java SE Development Kit 8 (CPU) (Java SE Development Kit 8 (CPU)) has an extension attribute requiring attention."
pointing to "Extension Attribute: Java 8 SE Development Kit"
see screenshot

22a533ea073741379d782d3b23ea09a0

Here is the bash code for the extension attribute:

!/usr/bin/env bash

##############################################################################

Collects information to determine which version of the Java JDK is installed by

looping through all the installed JDKs for the major version selected. And then

comparing the build number to determine the highest value. Builds the result as

1.X.Y, ignoring the build number, where X is major version and Y is the minor version. # #

####################################################################################

SEARCH_FOR_VERSION="8"
HIGHEST_BUILD="-1"
RESULT="Not Installed"

installed_jdks=$(/bin/ls /Library/Java/JavaVirtualMachines/)

for i in ${installed_jdks}; do version=$( /usr/bin/defaults read "/Library/Java/JavaVirtualMachines/${i}/Contents/Info.plist" CFBundleVersion )

major_version=/bin/echo "$version" | /usr/bin/awk -F'.' '{print $2}'

if [ "$major_version" -eq "$SEARCH_FOR_VERSION" ] ; then # Split on 1.X.0_XX to get build number build_number=/bin/echo "$version" | /usr/bin/awk -F'0_' '{print $2}' if [ "$build_number" -gt "$HIGHEST_BUILD" ] ; then HIGHEST_BUILD="$build_number" RESULT="1.$major_version.$build_number" fi fi done

/bin/echo "<result>$RESULT</result>"

Can anyone figure out what I wrong with that (I surely haven't changed anything) and how to fix that? Thank you.

Best regards,
Christian

3 REPLIES 3

Chris
Valued Contributor

This is an EA provided by Jamf.
They've made changes to it, and since an EA is basically code that gets executed on your machines every time they run recon,
you need to approve those changes.
I don't have one with pending changes at the moment, but you should be able to do that by hitting edit in the EA's options.

ryan_ball
Valued Contributor

@cbednarzwirecard You need to click edit on the patch software definition, go to the EA section, then approve it.

mm2270
Legendary Contributor III

I got confused the first time I saw one of those messages too, so you're not alone. The instructions aren't clear enough on what needs to be done to clear that error. It's not until you click Edit that you even see the "Accept" button in the Extension Attribute section.

46cefae5017041d5b848cef7bddf27fb

Maybe the wording in the message needs to include a basic instruction, like, "Click Edit on the Patch title and Accept the changes in the Extension Attributes section" or something like that.