Using SCCM 2007 / 2012 to deploy Java Runtime Engine Updates

Posted: 4th April 2011 by Seth Killey in SCCM

Here’s some instructions for updating staff computers to the latest version of JRE using Microsoft System Center Configuration Manager 2007 / 2012. These steps will allow you to silently deploy JRE

LAST TESTED: JRE 7.21 on Windows 7
For info on upgrading from version 6 to version 7

1) If Java is already installed on your test computer, first uninstall all versions of Java
2) Download the latest version of JRE http://www.java.com
3) You’ll get an .exe file, but you can get the .msi file by launching the .exe.  When the installation wizard starts, click next to start the download and when the program starts the actual installation navigate to the LocalAppData folder.  On Windows 7 this is located at C:\Users\<user>\AppData\LocalLow\Sun\Java\jre1.7.0_<version>\
4) Copy the .msi file to your desktop before installation completes, otherwise the file will be automatically removed
5) On your SCCM server setup your software distribution package according to your environment.  As far as program parameters, make sure you specify the /qn switch for a quiet unattended installation.  If you also wish to suppress reboots you can specify /qn REBOOT=ReallySuppress

Going forward you can easily refresh the package as new versions are released in SCCM.

  • First thing to check is if the advertisement was created with a mandatory schedule which hasn’t expired yet.
  • For SCCM 2007, select the package and launch the Manage Distribution Points wizard, select the option to Update Distribution Points and complete the wizard. Verify if the new version of the package and the updated files have reached the distribution point. On SCCM 2012, right-click on the package and choose “Update Distribution Points”.
  • For SCCM 2007, now go to the advertisement and click the action to Rerun the advertisement.  On SCCM 2012, right-click on package and click “Deploy” to create a new deployment task.

* It would probably be easiest to first rename the .msi file to something generic like JRE.msi so when you update the distribution point you can just overwrite the existing .msi.  Otherwise, make sure to update the program to point to the newest .msi file before updating the distribution point.

  1. Pam says:

    Thanks for this Seth! We are new to SCCM and it seems there are a few steps missing in Step 4, could you provide some more detail?

  2. mak says:

    Thanks Seth!

    I would appreciate if you can kindly email the screenshots of your settings to me as well.

    Thanks
    MAK

  3. John Michael McCauley says:

    I too would like the missing screen shots from step 4 or any additionals. Via “using SCCM to update java posted 4/4/11. I just got handed a 900 page SCCM book and was told to update Java.

    BTW love the side bar links – as follower of Christ I look forward to returning here…. jm

  4. Vida Aceves says:

    Hi,
    I would love a copy of the screenshots of step 4 as well.
    Thanks,
    Vida

  5. Arlene says:

    Am fairly new to SCCM and i had been needing to “import” the windows installer code for other msi’s. I get an error when I try to import on this .msi. is the code needed for this “flavor” of msi? I’m also hoping that the query to have the “ask” toolbar installed is also suppressed and not installed.

    Thanx!

  6. Larry says:

    Does the stupid ASK toolbar get installed when you do it this way?

  7. Seth says:

    @Larry – nope

  8. Robert Gowdey says:

    This does not work without the cab file.

  9. ITGURU1982 says:

    You can update your Java using WSUS…I’ve created a step by step guide to do it here:

    http://itguru82-sccm.blogspot.co.uk/2012/08/java-updates-using-wsussccm.html

  10. Fred says:

    I don’t understand how this works for you with only the 857 KB msi. If I run just that msi from an admin command prompt it gives an ‘error 1311 source file not found data1.cab’. I have been using SCCM for a while and believe I followed all the steps correctly. Also, when you say windows 7, is that the 32bit java on 64bit windows 7?

    Thanks!
    (I hate java)

    • Seth says:

      if your .msi file is 857 kb then you’re not getting the correct msi. Make sure when you run the .exe that you actually start the installation on your test computer. Once it starts running refresh the folder C:\Users\\AppData\LocalLow\Sun\Java\jre1.7.0_\ and you will see the file will be more like 27 MB. I deploy to Win 7 32 and 64 bit with Java 32 bit

      • Fred says:

        I’m working with 7u7, I have uninstalled any java on my system (win7 64bit). Within C:\Users\fspeece\AppData\LocalLow\Sun\Java\jre1.7.0_07
        is a Data1.cab (27MB) and jre1.7.0_07.msi (857KB) when I run the installer ‘jre-7u7-windows-i586.exe’. Before and after hitting the Install button within java setup that cab and msi file are there. I searched my entire PC for ‘jre’ and that is the only msi on there.

        • Seth says:

          Not sure…I just downloaded the 7u7 update, ran the .exe and get no cab file, just the 27 mb msi, and 2 dll files (which I don’t use). I run the install on a 32 bit Win 7 install because most of my clients are 32 bit. Also, I download on IE because our corporate network runs IE. I noticed when downloading in FireFox it gives a different filename for the .exe so not sure if it installs a different version if using an alternate browser. good luck

  11. Fred says:

    I needed to download the jxpiinstall.exe installer from the java site, not the Offline installer. I was always working with the offline installer!

    I even installed 32bit win7 in a VM just to make sure, then it hit me 🙂

    So now I have jre1.7.0_07-c.msi which is 26,304KB. However when I go to test it I get a windows error that says “The package could not be opened, verify that this is a valid windows installer package”. Seems I needed to proceed with the full install, then you get an msi that is slightly bigger, and that one works.

    Thanks for your help. Maybe others will not make my same mistakes 🙂

  12. Fred says:

    I have noticed that java installs but not fully, the icon in Programs and Features isn’t correct and the browser plugin doesn’t work. a manual reinstall fixes the problem. Are there any install switches/options that will also activate the java plugin?

  13. […] When I first setup my standard desktop image, I struggled with weather or not to include Java by default.  Ultimately, I included Java with my standard image, but with the continual battery of security flaws and mid-week patch deployments I’ve decided to take a more aggressive approach to limiting threats.  With the latest exploit announced a few days ago, I created a security group which included all computers except those I knew needed the Java plug-in.  I then created a group policy under Computer Configuration –> Preferences –> Windows Settings –> Registry.  The policy is rather straightforward in that I just create a new Registry Item that deletes HKEY_LOCAL_MACHINESoftwareJavaSoftJava Plug-in.  I also have a separate entry that disables automatic updates because I push those out via SCCM. […]

  14. Brandon says:

    I am working with SCCM 2012 and am attempting to begin updates for java, but when I try to run this script it does work. I attempted to pull the msi from the file path you said, but I only get the 863 KB – I refreshed multiple times, but the cab file stays at 27mb and the msi stays small. Do you have any suggestions on how to integrate the cab file or have a workaround – I would like to update everyone to 7.0.13. We are win7 x64 trying to install x32 java. Thanks!

    • Seth says:

      If done successfully, the MSI file will be named jre1.7.0_13-c and it’ll be about 27 MB. Are you trying to get the MSI on a computer with a previous version of Java installed? If so, uninstall Java first so it gives you the full installation MSI file

    • Seth says:

      I updated all computers to 7.0.13 last week and it went off without a hitch

      • Brandon says:

        Awesome – I worked on it some more and found the proper msi – now I’m just trying to get the package to work in SCCM – your blog has moved me a couple steps closer – but the package keeps failing on the test machine.

  15. Chris Bolton says:

    Have you ever tried to build a SCUP deployment for Java instead of using regular software packages? I know it’s possible and I have had some success building my own SCUP packages but thought I would ask if you or anyone else had found success in this area.

  16. Kyle Reyes says:

    I have having the worst time trying to get Java to update to 7.17

    I am using SCCM 2012 and had been updating each iteration of Java by creating a new package/application and deploying as needed.

    We would create a new package/application due to the fact there may be a need for each version of Java due the environment. I would “retire” the older versions and move them to a folder so as to not be used regularly. This was never a problem until after 7.11, since then newer versions will not install if advertised as a package, or installed as an application from the Application Catalog.

    I got onto a machine to test, and it does download the files but when I tried to manually install from the msi it says it cannot find the 7.11 msi for some reason. this didn’t happen from 7.9 to 7.11, only 7.13 and forward.

    Any suggestions?

    Also, I have tried to extract the MSI as you suggested and I am only getting the smaller KB msi and a larger MB cab file.

    • Brandon says:

      I’ve found that you can get the bigger msi file if you start to run the “online” update for java. Otherwise you will always get the smaller KB msi and larger MB cab.

  17. Andrew says:

    Can confirm that if you run the web based update you see the correct msi

  18. Jason W says:

    Has anyone had success? I need both 32 bit and 64 bit Java installations and thought the offline installers were the way to go. The issue is the .msi file is KB is size rather than the 27 MB. can anyone point me in the right direction?