More Java Updates
Oracle recently came out with yet another Java update, Java 7 Update 25. After looking to scrape together a couple of queries for a SCCM collection from the internet, I found that I was having a problem getting the collection query to work properly. One of the issues was that the examples I was reading were for Java 6 versions which has a different “DisplayName like” than Java 7 in the Control Panel.
Looking at some of the older Java queries I did not notice that my query said:
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “%Java(TM) 7 Update%”
was supposed to read:
SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “%Java 7 Update%”
So since the (TM) is removed in the Control Panel with newer version of Java, the query must change to match.. thus goes the perils of scraping queries off the Internet.
Note on Java Version Numbers
My second mistake making the Java Collection Query was trying to use the Java version number from the report I exported from SCCM.
The Java version I was using in my query I put in as 188.8.131.52 instead of 7.0.250 which did work in my update collection. Instead of checking the version number in SCCM make sure and use the version number from the Control Panel Add / Remove programs or Programs and Features since the query uses ADD_REMOVE_PROGRAMS.Version to determine the program version. In the Windows 8 Control Panel make sure and select “Details” from the viewing options since the default view does’t show the program version numbers.
Java 7 Collection Query
This query simply creates a collection of computers that have Java Version numbers lower than Java Version 7 Update 25.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “%Java 7 Update%” and SMS_G_System_ADD_REMOVE_PROGRAMS.Version < “7.0.250”