Short and sweet for those at MMS 2019 who were looking to inventory java usage with Configuration Manager. There is a 2018 System Center Dudes post on metering java. The post was based on a CI created by Steve Jesok of TCSMUG back in 2015. The original script doesn’t account for problems with newer versions of Java, for non-Oracle Java, or for Java 64-bit. I’ve resolved this and posted the updated script on my GitHub.
To use this, simply follow all of the instructions from The System Center Dudes website, including downloading and importing the CI, and then replace the included script with the script from my GitHub.
I am not an Oracle license expert, and can’t state with any accuracy what features you’re allowed to use from which versions, or what versions can be run in enterprise environments. I’m learning alongside everyone else. If you’re uncertain about what’s available to you, please reach out to Oracle or your Value Added Reseller (VAR) directly.
Update 2019-05-22: Michaël De Bona ran into a special case where Oracle will actually save the usage tracking file on a network share when profiles other than local profiles are used, which breaks the CI (both mine and the SCD post). To get around this, he wrote a separate CI to copy the file back down into the local profile so that it can be inventoried by our CI. This script, which he’s named Copy-JavaUsageFile can be obtained from the same repository on GitHub linked above.