Everything is Gray

A place to put stuff.

Python One-Liner for Determining Java Vendor

| Comments

Here’s a Python one-liner that prints the Java vendor on OS X clients, (e.g., Apple or Oracle).

1
python -c 'import os,plistlib; jv = plistlib.readPlist(os.path.join(os.path.realpath("/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"), "Contents/Info.plist"))["CFBundleIdentifier"].split(".")[1]; print jv.capitalize()'

Why?

…Because we can.

Comments