AuthorAshley ArchivesCategories |
Back to Blog
Check For Java Version On Mac10/20/2021
Here's Java's:And here's my script I'm submitting below. It's always good to look under the Third-Party section of the Nation to see if this stuff exists there. #!/bin/bash# Christoph von Gabler-Sahm (email-redacted)# 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"S_VERSION=$( /usr/bin/defaults read "$'Based on what had already submitted for an extension attribute, I'm submitting this one today that goes a little further and also gets the version. I run the script that some others have implemented as well that franton is using.I populate this by Script and the date type is String. This is useful when developing Android applications, which generally require Java 8 for its tools, versus server applications, which use later versions like Java 11. It sets JAVA_HOME inside your shell, in a way that can be set globally, local to the current working directory or per shell.#!/bin/sh# Original version for vendor by Richard Trouton on 5/8/13.# Modified to include version by Craig Ernst on 3/17/14.# Keep in mind that on a clean install of 10.8 the command 'java -version'# will prompt to install Apples old version of Java SE 6 if not installed,# and that 'java -version' will not give the true Internet Plug-In version.# Even after installing an Oracle version of Java that version info is not updated.# Also keep in mind that on 10.9 the command 'java -version' behaves similarly.# Although instead of a prompt to install Apple's version it will direct you# If reporting no Java or an Apple version you should consider installing# an Oracle version as Apple no longer updates Java.JavaVendor=`/usr/bin/defaults read /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Info CFBundleIdentifier`JavaVersion=`/usr/bin/defaults read /Library/Internet Plug-Ins/JavaAppletPlugin. You really need to use an extension attribute that see what version is really installed and then base smart groups and policies on that. As with other extension attributes, if your users have admin rights to their box and you're not stopping them from upgrading things like Flash, Flip4Mac, SilverLight, and Java on your own you can't really base your smart groups on the last installed Casper Package of those installed by you.
![]() ![]()
0 Comments
Read More
Leave a Reply. |