Posted on 01-16-2014 07:25 AM
We install both the Apple Java and the JDK 7 u XX installed on the systems. I have an EA that reports the java version, but it only reports one of them (typically JDK 7s). So I scope the policy that if the JDK isn't teh current version, then I push both the apple and the JDK...
is there a better way to do this?
Posted on 01-16-2014 07:39 AM
Not that this is a 'better' way but this is how we manage the Javas (Javi?)
We update Java (oracle) 1.7.x with JSS policies scoped to a smartgroup. That smartgroup is based on Plug-In title and version.
We update Java (OS) 1.6 with NetSUS appliance. In the past we used JSS policies with the smartgroup based on an Extension Attribute
Here is the code for the EA that picks up the Java (OS) version:
#!/bin/bash
#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
Posted on 01-23-2014 06:30 AM
Hi there, not exactly what you asked for but…
I also did split the updates in Java (OS) and Java (Oracle) in the past but I installed JDK 7u51 on a fresh installed machine (10.8.5) yesterday and this seems to be different:
The EA for Oracle and the EA for OS both show now 7u51. The stuff I did a quick test with is running,... Could it be "one install to rule them all" ?
Posted on 01-23-2014 09:48 AM
that's what I am thinking, I'm just looking for confirmation I think :)
Posted on 01-23-2014 11:44 AM
… I overlooked a programm that needs 32-bit Java, so I cannot get rid of Java 6 :-( back to "twin" installation :-(
Here the EA for Java PlugIns
#!/bin/sh
# jav7.sh
#
#!/bin/bash
# Christoph von Gabler-Sahm (email-redacted)
# Version 1.0
# checks installed version of Java Applet Plugin
# returns values like "Not installed", "JavaInstallOnDemand: 14.5.0", "JavaJDK16: 14.5.0" or "Java 7 Update 09"
PLUGINPATH="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"
# Plugin version
S_VERSION=$( /usr/bin/defaults read "${PLUGINPATH}/Contents/Info" CFBundleShortVersionString 2>/dev/null )
# JavaInstallOnDemand or empty
S_PROJECT=$( /usr/bin/defaults read "${PLUGINPATH}/Contents/version" ProjectName 2>/dev/null )
if [[ -e "${PLUGINPATH}" ]]; then
if [[ "${S_PROJECT}" == "" ]]; then
EA_RESULT="${S_VERSION}"
else
EA_RESULT="${S_PROJECT}: ${S_VERSION}"
fi
else
EA_RESULT="Not installed"
fi
echo "<result>${EA_RESULT}</result>"
Posted on 01-23-2014 03:42 PM
@jwojda Have you run into any issues with pushing a JDK? Just curios if it has created issues if someone is using the JDK when it upgrades.
Posted on 01-24-2014 12:13 AM
I had a prg that was not working when I pushes the upgrade on top of the old one. Since then I do a uninstall of the old package before I deploy the new one.
Posted on 01-24-2014 07:40 AM
Just an FYI....looks like Apple may be done with Java 6.
http://derflounder.wordpress.com/2014/01/23/end-of-the-road-for-apples-java-6-updates/