After January 2019, businesses will need a commercial license to receive updates for Oracle Java SE products. This means that if you’re using Java in your environment, chances are that your management will need to know how many licenses to buy and how many PC has Java installed but don’t use it.
The bad news is that SCCM Software Metering cannot do a reliable job to track Java Usage since the executable file always runs on computers. The good news is that there’s a way to track Java usage using Oracle tools… but it’s not straightforward.
After searching, I found an awesome script made by Steve Jesok that do exactly what I needed. Unfortunately, the blog post is a bit old and don’t have detailed information on how to implement it.
We will guide you through the process and we’ll also provide a free report to help you track your java usage using SCCM.
Java Usage Tracker requires a commercial license for use in production. To learn more about commercial features and how to enable them, see Oracle Java SE Advanced & Suite Products.
Process Overview
Here’s a high-level process overview. It’s quite simple as the PowerShell script, configuration item and report are already created. You only have to import everything on your SCCM server.
- Download Java inventory .zip file
- Import Configuration Data in SCCM
- Modify Configuration Baseline
- Deploy Configuration Baseline
- Import Report
Download SCCM Java Inventory .zip file
I cannot say this enough, all the magic behind this solution is possible because of Steve Jesok script. Download the .zip file from the MNSCUG website or from our direct link (backup link…) and save it on your computer.
Import Java Configuration Data
Once you have downloaded the .zip file, extract it so you have a .cab file. We will use the .cab file to create a Configuration Item in SCCM.
- In the SCCM Console, go to Assets and Compliance / Compliance Settings / Configuration Items
- Right-click Configuration Items and select Import Configuration Data
- Click Add
- Select the JavaUsageTracking.cab file
- Click Next
- Click Next
- Validate and close the wizard
- The Java Logging Configuration Item has been created
- Right-click the Java Logging Configuration Item and select Properties
- By default the Configuration Item cannot run on Windows 10, select the Supported Platforms and enable Windows 10. Select Other Operating System that you want to support.
- You should also have a Java Usage Tracking Configuration Baseline created by the import process
- Right-click the baseline and select Deploy
- Click Browse and select a test collection
Java Configuration Baseline – Test and verification
We will now evaluate the Java Configuration Baseline on our test computer.
- Log on your test computer
- Open Control Panel / Configuration Manager applet
- In the Configurations tab, select the Java Usage Tracking baseline and select Evaluate
- Once Evaluate, click View Report
- The report will show Non-Compliant but this is normal
- Validate the presence of the usagetracker.properties file that has been created by the baseline. The file should be in the C:\Program Files (x86)\Java\Jre[yourversion]\lib\management folder
- The script also logs its action in the SCCM log directory – CM_JavaUsageLogging.log
- The CM_JavaUsageTracking WMI class has been created
- Launch any application that needs Java or visits any web page that needs Java.
- After a couple of minutes, you should have some data in the WMI classes. This confirms that the monitoring process is fully functioning
Collect information using Hardware Inventory
Now that our data is in WMI, we need to instruct SCCM to gather this information in its next hardware inventory cycle.
- Open the SCCM console and go to Administration \ Client Settings
- Select your Default client setting and select Properties
- Select Hardware Inventory and select Set Classes
- In the Hardware Inventory Classes window, click on Add
- Click Connect and enter the test computer name and leave the default WMI Namespace (root\cimv2)
- A list of the inventory classes will show, find CM_JavaUsageTracking, check it and click Ok
- You can leave the inventory classes in the Default Client settings or you can enable it in a custom one if you have one
- Make sure that the client setting is deployed to your test collection and initiate a Hardware Inventory from the Configuration Manager applet
- As in any Hardware Inventory cycle, you can validate that the new classes get inventoried in the InventoryAgent.Log
- The CM_JavaUsageLogging.log in the SCCM logs folder should show activity
Java Data Verification
- In the SCCM Console, right-click your test computer and select Start / Resource Explorer
- You should see the CM_JavaUsageTracking classes under Hardware
- If you are familiar with SQL, a new v_GS_CM_JavaUsagetracking view has been created
Report
Now that our Java tracking data is gathered by SCCM we have built an SSRS report to show which computer has run Java. You can download the free Asset – Java Inventory and Metering report by visiting our product page. Leave us your comments if you are using our report so that we can improve it over time.
This report will work only if the above steps have been made. If you try to run the report without creating the Java view, the report will fail
[ratings]
Garrett
01.16.2019 AT 09:52 AMPhilC
01.15.2019 AT 06:23 AMChris Kibble
01.07.2019 AT 08:34 AMthohun
05.06.2019 AT 09:04 AMGarrett
01.15.2019 AT 05:43 PMChristopher Kibble
02.04.2019 AT 05:42 PMGarrett
01.15.2019 AT 01:34 PMScott Durham
12.13.2018 AT 11:54 AMBrady
12.18.2018 AT 02:29 PMBenoit Lecours
12.18.2018 AT 12:51 PMSean
12.13.2018 AT 10:23 AMJonathan
10.22.2018 AT 09:13 AMTobias Hennighausen
10.09.2018 AT 07:27 AMM3
10.04.2018 AT 01:02 AMAnthony
08.21.2018 AT 03:50 PMM
08.16.2018 AT 03:39 PMcdnsteel
09.27.2018 AT 11:31 AMGK
08.15.2018 AT 10:02 AMcdnsteel
07.19.2018 AT 10:55 AMcdnsteel
08.13.2018 AT 09:20 AMRobert Stein
08.21.2018 AT 03:36 PMcdnsteel
09.27.2018 AT 11:27 AMTim Brady
07.19.2018 AT 12:11 AMcdnsteel
07.19.2018 AT 11:12 AMTim Brady
07.19.2018 AT 12:01 AMMatt
11.18.2019 AT 01:45 PMJohan
05.22.2019 AT 01:35 AMSimon Jäggi
07.11.2019 AT 09:09 AMNathan
07.12.2018 AT 06:11 PMcK
06.29.2018 AT 08:25 AMBuster Frith
06.22.2018 AT 07:42 AMsj
08.07.2018 AT 03:46 PMSoren
05.28.2019 AT 08:17 AMSimon Jäggi
07.11.2019 AT 07:25 AMPaul
07.12.2019 AT 05:24 PM