Skip to content

Instantly share code, notes, and snippets.

@rtrouton
Created October 31, 2012 15:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtrouton/3987535 to your computer and use it in GitHub Desktop.
Save rtrouton/3987535 to your computer and use it in GitHub Desktop.
OS X Java vendor Extension attribute
#!/bin/sh
javaVendor=`defaults read /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Info CFBundleIdentifier`
if [ "$javaVendor" = "com.oracle.java.JavaAppletPlugin" ]; then
result=Oracle
elif [ "$javaVendor" = "com.apple.java.JavaAppletPlugin" ]; then
result=Apple
elif [ "$javaVendor" = "" ]; then
result="No Java Plug-In Available"
fi
echo "<result>$result</result>"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment