Script for finding JAVA version information as Extension Attribute

clrlmiller
New Contributor III

Just wanted to pass along a little help for anyone who might be looking for it.

With all the Hoo-Ha earlier this week regarding Java exploits and the end of times. BTW, the exploit appears to be within v1.7 of Java and NOT v1.6 which is the default installed onto Snow Leopard, Lion, Mountain Lion. As a proof to management on why not to worry I crafted a little script to poll the version of Java and report it as an Extension Attribute. Please feel free to use.

#!/bin/bash

############################################################################
#
# Extension Attribute checks to display Java Version number.
# #
############################################################################

java_version=java -version 2>&1 | head -n 1 | cut -d" -f 2
echo "<result> $java_version </result>"

exit 0

1 REPLY 1

rockpapergoat
Contributor III