Anyone have a good method or suggestion on how to collect Java version on clients?
My method (which isn't working) was I wrote an extension attribute. But...even though the command works manually on the client, no information is collected in the JSS.
I've verified that the client is executing the Extension Attribute by examining an output file after performing Recon (sudo jamf recon -saveFormTo /pathtofile). I see my other Extension Attributes - and I see that it runs the Java attribute - but no information is being collected.
Here is my attribute:
Data Type: String
Input Type: Populated By Script
#!/bin/sh
echo "<result>java -version
</result>"
When run locally (manually) you get this output:
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
Any ideas on the best way to get the Java version in Inventory? Thanks!
Sean