Posted on 02-07-2013 02:11 PM
Hello jamfnation- does anyone have an extension attribute that can report the Oracle java version in addition to Apple's versions?
All the extension attributes I've seen are based on the java -version bash command, which only seems to return information about the apple-supplied JRE, not the one from Oracle.
Solved! Go to Solution.
Posted on 02-07-2013 02:16 PM
If you pick through this post:
https://jamfnation.jamfsoftware.com/discussion.html?id=5641#respond
You'll find this link to Rich Trouton's blog:
I'm using Rich's method to identify the vendor, and the method he links to to identify the version.
Posted on 02-07-2013 02:16 PM
If you pick through this post:
https://jamfnation.jamfsoftware.com/discussion.html?id=5641#respond
You'll find this link to Rich Trouton's blog:
I'm using Rich's method to identify the vendor, and the method he links to to identify the version.
Posted on 02-07-2013 02:23 PM
Perfect, thanks Steve!!
Posted on 02-08-2013 10:28 AM
Hi Guys,
A bit late to the party here, but I came up with a solution for several customers to report every version of Java installed on their Macs, and then pump that into an EA.
#!/bin/bash
# set get numeric values of versions from the java framework folder
# grab integers only
javaVersions=$(/bin/ls /System/Library/Frameworks/JavaVM.framework/Versions | /usr/bin/grep '[0-9].[0-9]')
# now loop through the results and into an extension attribute
for i in ${javaVersions}; do
echo "<result>${i}</result>"
done
# now check for version 7
version7=$(/bin/ls /Library/Java/JavaVirtualMachines/)
if [[ ${version7} != "" ]]
then /bin/echo "<result>${version7}</result>"
fi
exit 0
This was quick and dirty and on the fly but it seems to be what the customer wanted. So, hopefully this may help some of you. If you look at the java binary it is just a symbolic link to the current version in the framework folder, however when you install the newest Java it puts it in a different location and I think (have not verified this yet) it uses a totally different command line binary.
Hope this helps,
Tom