How is everyone pushing out JAVA?

cgordy
Contributor

I've been pushing out JAVA as updates are released.
I typically would just scope to All Computers.
However, this seems a tad messy - some newer machines go out with the newest version already on them, so it is unnecessary work on the machine.

I was going to build a Smart Group to identify the machines with older versions, but when Inventory is collected on those machines, the version number is n/a - so I am not sure how to do it.

9 REPLIES 9

bajones
Contributor II

I set up the install policy to scope to all computers. Once the policy is saved, I create a static group that contains all the computers waiting to run the policy. Then, I remove all computers from the scope of the policy and add the static group I created. This way, any new computers added since the policy was created will not be in the scope.

scottb
Honored Contributor

There is a bug in Oracle Java 7_25. The update mechanism shows it still as current, it's not.
Clients using the Pref Pane will think they're current with 25 unless they know 40 is out.
I have just been testing pushing the Oracle pkg as-is. Works fine. I suppose there's 20 ways to do it, this one works fine.

nkalister
Valued Contributor

I use extension attributes to get the version of apple and oracle javas installed, then scope my pushes to smart groups.
Apple Java 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

Oracle Java version:

#!/bin/bash

if [ -e /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java ]; then
    java_version=`/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version 2>&1 | head -n 1 | cut -d" -f 2`
    echo "<result>$java_version</result>"
else
    echo "<result>Not Installed</result>"
fi
exit 0

rtrouton
Release Candidate Programs Tester

I've been using two extension attributes to help with this (info posted here on my blog):

http://derflounder.wordpress.com/2012/10/31/casper-extension-attribute-scripts-to-report-java-browse...

Previous JAMF Nation thread: https://jamfnation.jamfsoftware.com/discussion.html?id=5790

With the information from the EAs, I'm able to build smart groups that include machines in my shop that need updated versions of Java. For example, if a machine is on 10.7.x or 10.8.x and reports Apple as the Java vendor, Casper installs the latest Oracle Java 7 update.

scottb
Honored Contributor

I was reading your posts yesterday to do this more better. Thanks for that info. As I learn, I find your site up on my Mac daily. Invaluable resource. Thank you df!

Info on the bug in 1.7.0_25:

Area: install/auto_update
Synopsis: On Mac OS X update from the Java Control Panel on a system with JRE 7u25 fails to find JRE 7u40.

Mac OS X users with JRE version 7u25 installed that try to update using the Java Control Panel are told that they have the current version installed rather than being offered the option to install 7u40.

For more details see: JDK-8024640.

JPDyson
Valued Contributor

Yikes. Too manual.

  1. Extension Attribute that tells you what version of Java are on your systems
  2. Smart Group for Macs that are not running your preferred version(s) of Java (based on #1)
  3. Policy set to Ongoing, targeted to the Smart Group, that installs your preferred version of Java

All Macs not running your preferred version of Java will run the policy and get the install. Use this model for your whole core application stack and put the system to work for you.

Edit: This post got delayed, like, a lot. It was a response to the first two.

CasperSally
Valued Contributor II

And to build on JPDyson's method, don't forget 'update inventory' as part of the policy so once installed, the machines fall out (or into) the smart group.

bthomason
New Contributor II

When you create an extension attribute, does it automatically fill in after the inventory check-in. I just had to run Jamf recon -verbose to show up on a client inventory.

Thanks

Chris_Hafner
Valued Contributor II

Almost ditto,

•EA to scope Java Version (smart group)
•.pkg directly from Oracle (in an ongoing package with recon)
•small script to disable java automatic update (We handle that for our users).