Home > Casper, Java, Mac administration, Scripting > Casper Extension Attribute scripts to report Java browser plug-in info

Casper Extension Attribute scripts to report Java browser plug-in info

To help Casper admins identify which Macs should be getting the new Oracle Java 7 browser plug-in update, I’ve posted a couple of Casper extension attributes to my GitHub repo. The first one detects if a Mac’s Java browser plug-in in /Library/Internet Plug-Ins was supplied by Apple or Oracle. If no Java plug-in is detected, a No Java Plug-In Available message is displayed.


javaVendor=`/usr/bin/defaults read /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Info CFBundleIdentifier`

if [ "$javaVendor" = "com.oracle.java.JavaAppletPlugin" ]; then
elif [ "$javaVendor" = "com.apple.java.JavaAppletPlugin" ]; then
elif [ "$javaVendor" = "" ]; then
        result="No Java Plug-In Available"

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

The other one was shared on JAMF Nation by Christoph von Gabler-Sahm. This script detects the version of the active JavaAppletPlugin plug-in in /Library/Internet Plug-Ins.


# 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="Not installed"

echo "<result>${EA_RESULT}</result>"

For Macs that have had the Java for OS X 2012-006 update installed, Christoph’s script above will report the following version status:

JavaInstallOnDemand: 14.5.0

Both scripts are available on my GitHub repo:



  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: