Hey guys,
I was updating my image recently and I decided to move to Java Runtime 7. I noticed that after I started using this, the Extension Attribute stops working, or rather it reports as not installed even though it is.
This is the EA that I'm using:
#!/bin/sh
#Check if java_home is defined
javaHome=`/usr/libexec/java_home 2> /dev/null`;
if [ ! -z $javaHome ]
then
vers=`java -version 2>&1 | grep "java version" | awk '{print substr($3,2,length($3)-2);}'`
echo "<result>$vers</result>"
else
echo "<result>Not Installed</result>"
fi
I think I know what the problem is, I just don't know how to fix it.
It seems that when it tries to run "java -version" from terminal it fails because we don't install the JDK. (If I go to terminal and type "java -version" it attempts to give the site to install the JDK).
We would rather not install the JDK as well, unless necessary.
Anyone have any thoughts?
Sincerely,
TJ