Tuesday, September 13, 2016

Java management and you

Just uttering the word Java to any SCCM admin can bring forth repressed axe-murdering thoughts.  No worries - I hope to at least somewhat alleviate administering Java in an SCCM environment with this post.

Traditionally, Oracle/Sun has a history of leaving old Java versions installed even when updating to new versions.  This is where the headache comes in.  In a perfect world, Java would be actually updated with no previous versions left behind.  I suppose this can be a good thing for developers/testers, but for the majority rest of us, yeah, no.

First, you'll need the Java archive.  Thankfully Oracle keeps an online archive of every old Java version there is - JDK, JRE, 32-bit, 64-bit, you name it - all available with sign-up of a free Oracle account (and no, they don't spam your email after sign-up).

The link is here: http://www.oracle.com/technetwork/java/javase/archive-139210.html

To ease the pain of downloading every single version to add to SCCM for uninstallation, I'd highly suggest running a report of what Java versions are actually installed in your environment.  This can be best articulated with the Count of instances of specific software registered with Add or Remove Programs report in SCCM (under Monitoring / Reporting / Software - Companies and Products).



This report can give you a general idea of what old versions of Java to download.

The key to making this entire process speedy (at least for SCCM) is to obtain the MSI file inside the Java executable package.  This is fairly easy but requires a bit of legwork.  Once you download an old version of Java from the archive, run the executable, but don't install it.  On the first screen of the Java install, it has already extracted the files to a temp folder to install.  Simply leave the install window open and open Windows Explorer to navigate to C:\Users\<your username>\AppData\LocalLow  Depending on the Java version, you'll see a Sun or an Oracle folder.  Navigate to either folder, then Java, and you'll see the version of Java you just installed indicated in a folder (e.g. jre1.8.0_65_x64 or similar format).  Inside that folder is the MSI file you will need.  Copy this MSI file (and only the MSI file - if there are CAB files, they can be disregarded) to your SCCM application file share.  After this is copied (the Java installation can be cancelled, BTW), create a new application and point it to the MSI file you copied on your SCCM app share.  SCCM will automatically do what is needed to add the MSI - no modifications are needed after adding the MSI.

Once each Java MSI is added to SCCM, you can deploy an Uninstall deployment to the Collection of your choice.  Rinse and repeat the above paragraph for all other Java versions found in the report you ran.

If you find yourself adding a lot of versions of Java, you can optionally create a folder for all Java versions under your Applications list in the SCCM console (under Software Library / Application Management, right-click Applications and point to Folder - Create Folder)

No comments:

Post a Comment