Deploying Java with SCCM

Here’s how I’ve been able to deploy Java via SCCM 2007 (this method works for both Java 6 and Java 7):

1. Download the version of Java JRE you want to deploy HERE (specifically, the Offline installer; we use x86 even though we have x64 machines).

2. Run the Java EXE.

3. Find the temp folder it unpacked to (probably C:\Users\%USERNAME%\AppData\LocalLow\Sun\Java for whatever user context you ran it under).

4. Take the MSI in that folder, along with Data1.cab. Put BOTH those in your source folder (it will fail if you don’t copy Data1.cab as well).

5. Create Package from Definition using that MSI.

6. Deploy! It is very important that when you deploy this to your clients, all browsers are closed and Java is not running, otherwise your deployment may fail. My environment forces all client machines to reboot half an hour into our weekly Maintenance Window, so we always push these updates after that reboot to ensure Java and browsers are not running.

If you have a more efficient method, or any questions, leave a comment!

18 thoughts on “Deploying Java with SCCM

  1. Miguel

    What is the reason for do this and not distribute directly *.exe offine silent instalation program ?

  2. Timothy

    I’m not sure if my reason is the same as the author’s, but if you attempt to install the EXE directly through SCCM, it will use LOCAL SYSTEM as the launching account and for some reason it will generate an error when doing it that way. If you launch the MSI it works fine.

  3. Pingback: Resolving RegUtils error per-machine when deploying Java via SCCM – Adventures in Software Deployment

  4. CCM-NOOB

    So just used this technique to push the JAVA7u11 zeroday patch to my test collection. works like a champ! I selected the per-system unattended method for the deploy package. stuck with 32bit even though 64bit target OS.
    Thanks for this post!

  5. Fred

    How do you get the plugin to install correctly in web browsers? I have used the method described to deploy to user’s machines but it doesn’t seem to install the browser plugin correctly. what line are you using for your install string in the package? In “Command Line” I have:
    jre7.9.msi /qn AgreeToLicense=YES IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL SYSTRAY=0 EULA=0 JAVAUPDATE=0 AUTOUPDATECHECK=0 JU=0 REBOOT=ReallySupress

    Installing to win7 64bit clients with 32bit browsers.

    thanks for any help!

  6. Andy

    Having same issue as Fred, specified IE and mozilla to =1 in MSI (using InstEd) but FF isn’t picking up the plugin correctly. Same config as Fred; x64 clients and x32 browsers.

  7. Supermark Post author

    Hey Andy,
    When using the MSI, I don’t believe the command line parameters work. You may want to consider using a program like ORCA to create a transform file (MST). Unfortunately, I’ve never done that, so I can’t give you any guidance on that. Also, it may be worth noting that the Java 7 EXE uses different command line parameters than Java 6: http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jre-installer-options.html

    I just use the standard “Per-system unattended” program that SCCM generates when you import the MSI using “Create Package from Definition.”

    Hope that helps!
    -Mark

  8. Garrett

    FYI…We were getting a high number of reports of Java not being recognized in IE after updating to Java 7 Update 11. Note: We were targeting PC’s with Java 7, Update 7. After a bunch of trouble shooting, we figured out that if Internet Explorer was open while installing this via SCCM, it was causing the problem. For problem PC’s. we had to remove Java, reboot and then install Java only if IE was closed. For future installs, we had to make sure IE was closed before updating Java.

  9. Anders

    -> Garrett

    We are facing the same issue.
    how do you handle that ? Did you make a script that killed IEXPLORE.EXE or did it run a small script, that tested if IEXPLORE.EXE was running ?

  10. Supermark Post author

    Hey Anders and Garrett,
    Thanks for the comments. In my environment, we force a weekly reboot a half hour into our Maintenance Window, and always do these deployments after that reboot. This ensures that no software is running that will prevent us from updating anything. I’ve edited the above instructions to mention that. Sorry for the confusion!
    -Mark

  11. Lisa

    I have successfully deployed Java 7 updates and currently amd deploying 15 (32bit) using SCCM 2007 and have set the program to run with or without user logged in. This has worked successful for all Win & and xP except on a few machine (3) where we get errors where the package is uninstalling and can’t find the MSI – seems to be looking for Java7 update 7 – we cannot install the Java either manually or via SCCM. The previous MSI is missing from the location the package is looking at (seems to be the SCCM server). It only affected 2 machines but we end up having to fiddle around for hours trying to find a way to uninstall before we can install the new version. We have one Win 7 PC like this at the moment. Has anyone come across this before?

  12. Jeff

    We are finding if we don’t remove Java prior to installing the updated versions it causes issues with our reporting software. Additionally when uninstalling java via script it is sometimes requiring a reboot and kills the windows installer service which prevents the update from installing.
    Win7 x64 with IE32bit browser – I’m pushing via a script in SCCM and using WMIC to target all java versions as our environment is mixed from java 5 to java 7.

  13. Mike

    I’ve run into problems relying on the installer to correctly remove old versions. Attempting to install Java silently to a machine which already has Java installed silently results in the following:
    * Add/Remove programs contains an entry for java, but attempting to remove it causes an error.
    * IE does not have the Java plugin available.

    To circumvent this I check for and conditionally remove (with msiexec /x{GUID} /qn) all known prior versions of java before deploying a new version.

  14. Bill Hunt

    I have been able to deploy Java in my environment via SCCM ’07 and now ’12 as an application successfully. For the most part the instruction provided by here are accurate, but as others have reported there are some other caveats that are unique to deploying Java.

    1. Previous Java version and Updates should be removed.
    What we found was that each Java update has a unique MSI Product code. To remove old version what I did was create an uninstall package (we did this in SCCM ’07) and create a custom Task Sequence to run each package with Continue on error enabled. This was done to ensure that any old version of Java had been removed from as many systems as possible. Pretty much a slash and burn approach to removing Java since I have yet to find a silver bullet to remove old Java versions.
    Once the old version were removed we simply installed the most recent Java. For each update release we just remove the last version (since it should now be the only version) and install the new one. In ’07 I used a TS to accomplish this, in ’12 we use the supersedence option.

    2. corrupted installs of Java
    We too do weekly reboots on all workstations. Even doing this though we found a number of users still had IE open during the installation of Java. To avoid this we simply set the Java Application in SCCM ’12 to only run when no users were logged in. This way we ensure that there are no browsers open. Once we applied this we were able to achive 90% success. As the Mark has posted as well corrupted installs of Java cannot be remotely fixed, so I would strongly recommend only deploying java in this way. fortunately for us we found this during testing and were able to adjust our deployments accordingly.

    3. Installing Java plugin for non-IE browsers (Firefox)
    Currently in my environment we only support IE, but Java can be deployed for other browsers as well, you just need to make sure the MSI has the correct parameters. This is just conjecture, but I believe can be helpful for anyone in this scenario. By default Java is distributed as an EXE, what I’ve found is one of the reasons for this is that the MSI can be modified on the fly to support both IE and Mozilla based browsers installed on the machine. Orca can be used to create a MST file to enable support for other browsers. I use an MST anyway to disable updates for Java anyway. For details on this I recommend ITNinja.com.

  15. Matthew McGee

    I’m just starting to use SCCM. I started by publishing Java 7 60, now 7 65 is available. What is the easiest way to keep up with frequent updates? I generalized my deployment to point to a …Java\current\ folder where I have renamed the MSI to simply be jre.msi

  16. Deb

    Have you worked with SCCM 2012 yet? I need to create the uninstall and reinstall in one package. I’m still new at SCCM, so I still have a lot to learn.. I’m having to learn trial by fire.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please do some math to prove you\'re a human: * Time limit is exhausted. Please reload the CAPTCHA.