Updating Java to version 8.31 issues

New Contributor II

I am building/creating a package to update Java from 7.60 to 8.31. Package is created in Composer, dropped into Admin, policy created in Casper. When the package is run on client machines it returns as completed successful, but nothing happens to the Java version.

Have tried package from a Composer snapshot and also just dropping .pkg downloaded file into Admin.

No errors, just get nothing updated. Wondering what I am doing wrong.


Release Candidate Programs Tester

There shouldn't be a need to repackage the Java 8 installer, as it should work as-is.

How are you verifying that Java is updated? Are you using an Extension Attribute?

Valued Contributor II

I skip Composer packaging completely. When you download Java 8 Update 31(b) there's a package inside the .DMG you can drop into Casper Admin and deploy right away.

What I do:

  1. Go to http://www.java.com/en/
  2. Download
  3. Open the .DMG, drag the Java package to desktop
  4. Drag Java package into Casper Admin
  5. Test/Push

Hope this helps.

Contributor II

There are many more steps to making the OS see the new Java. You need to tell it where the new java home is. Which when you install java, it doesn't remove the Apple installed java, so you will need to remove that. Then you will need to create the symbolic link that was in place when the Apple version of java was installed.

First I would see which version of java the OS thinks is the installed one. To do this type the following: java -vers

This will give you the info you need to start. From here you will have to do some digging.

The apple installed java is install in /System/Library/Java/

Most likely when you install java it is installed in /Library/Java

Now that you have all of that set, you need change the java home.

How the OS determines where java_home is by the putting the following into your ~/.bash_profile:

export JAVA_HOME=/usr/libexec/java_home -v 1.7

Change the version number depending on what you have.

Valued Contributor III

Since in the past I've seen Casper treat plug-ins as Apps I usually recommend removing the old version before installing a new version. I have a script that runs before any Java update that 1st removes the plugin and then I run the install with my composer captured install.
Gabe Shackney
Princeton Public Schools

Gabe Shackney
Princeton Public Schools

Valued Contributor II

@timlarson, this is what I use thanks to Rich

# Update Java 8 JRE for Mac OS X
# Update paths and version numbers as released by Oracle

# create temporary directory and set permissions
mkdir -p "/var/tmp/java"
chmod 755 "/var/tmp/java"

# grab latest Java from Oracle
cd /var/tmp/java/ && curl -L -C - -b "oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u31-b15/jre-8u31-macosx-x64.dmg" > "jre-8u31-macosx-x64.dmg"

# mount the dmg
hdiutil attach -nobrowse /var/tmp/java/"jre-8u31-macosx-x64.dmg"

# install the pkg
installer -pkg /Volumes/"Java 8 Update 31"/* -target / -verbose

#unmount the dmg
hdiutil detach /Volumes/"Java 8 Update 31"/

# remove the dmg
rm -rf /var/tmp/java/"jre-8u31-macosx-x64.dmg"

exit 0

Extension Attribute


# Displays Java Web Plugin Version

if [ -e /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java ]; then

result="$(/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version 2>&1 | grep "Java(TM)" | awk '{ print substr($6, 1, length($6)-1); }')"

echo "<result>$result</result>"


echo "<result>Java not installed</result>"


New Contributor II

Thanks for the responses. Since this isn't even making it past my test machines, I am able to verify (or not verify) the update directly on the machines by verifying java version using a web browser. I have tried bypassing Composer all together as suggested but get the same results.

Looking at the file/folder structure reveals that the javaappleplugin is not changed during the policy install. So even though it says successful, I doubt whether any files have actually been changed.

Hadn't considered removing old versions of Java first, will be looking into it.

Release Candidate Programs Tester


I also have a script for installing the latest version of Oracle's Java 8. It's available from here:


Honored Contributor

@rtrouton - that's pretty slick! Thanks for posting it.
We basically do what @mvu does above, so I never looked beyond that...