If your orginization are is using applications that rely on Java Runtime Environment, deploying that to your clients with ConfigMgr 2012 is the way to do it. This post will go through the necessary steps to deploy Java Runtime Environment 7 (JRE) in the Application Catalog and to keep it up to date with an Application Management collection.

Overview

  • Download and unpack the MSI
  • Create an application for JRE
  • Edit the application
  • Distribute the application
  • Deploy the application
  • Create a collection for application management

Download and unpack the MSI

Download the latest version of Java Runtime Environment here: http://java.com/en/download/manual.jsp

I normally only download and deploy the 32-bit version. If your environment require the 64-bit, the process of deploy that is the same as described in this post.

57_1

1. Once you’ve downloaded the version of JRE that you’ll be deploying, launch the setup but don’t do anything else.
2. Browse to C:\Users\<your_username>\AppData\LocalLow\Sun\Java\jre1.7.0_<update_number>.
3. Copy the two files from the above folder to a folder in your Content Library. In my lab environment that is \\CM01\ContentLibrary$\Software\JRE\7_<update_number>. It’s always a best practice create a well organized folder structure in your Content Library.

57_2

Create an application for JRE

1. Open the ConfigMgr 2012 console and go to Software Library.
2. Expand Application Management.
3. Right-click on Applications and choose Create Application. In my opinion you should always create a folder structure for your applications. If you’ve already created folders under Applications, determine if you need to create a new folder or use an existing folder depending on your configuration. In this post we’ll create the application in the root, just for demoing purposes.
4. On the General page, make sure that Automatically detect information about this application from installation files is selected and that Type is Windows Installer (*.msi file). In the Location field, enter the path to the MSI file we unpacked earlier and stored in the Content Library. The path should be \\CM01\ContentLibrary$\Software\JRE\7_<update_number>\jre1.7.0_<update_number>.msi. Click Next.

57_3

5. On the Import Information page, click Summary.

57_4

6. On the Summary page, click Next.

57_5

7. Once the application has been created, finish the wizard by clicking Close.

Edit the application

I’ll not cover all the functionality of the Application Model in this post, and not go through each tab either. I’ll only focus on the most important configurations.

Right-click the newly created Java 7 Update <update_number> application and choose Properties.

General Information tab

1. On the General Information tab, I recommend to enter the following information:

  • Name: Java Runtime Environment
  • Publisher: Oracle
  • Software Version: 7 Update <update_number>

1.1. Optional: Select or create a new Administrative category for the application.
1.2. Optional: If you’re going to install this application during OSD, check the Allow this application to be installed from the Install Application task sequence action without being deployed box.

57_6

Application Catalog tab

1. On the Application Catalog tab in the Localized application name field, enter the following name Java Runtime Environment.
2. Click on the Edit button next to the User Categories field. Create a new category or select an existing. I recommend to create a category called Java Runtime Environment.
2.1 Optional: Fill in the rest of fields if you please, e.g. User documentation, Link text or change the Icon.

57_7

Deployment Types tab

1. On the Deployment Types tab, select the deployment type called Java 7 Update <update_number> – Windows Installed (*.msi file) and click on Edit.

Deployment Types – General tab

1. In the Name field, change the name to Java Runtime Environment 7 Update <update_number>.

57_8

Deployment Types – Programs tab

1. In the Installation program field, amend the command line with a “n” at the end.
2. In the Uninstallation program field, amend the command line with a “n” at the end.
3. Click the Browse button next to the Product code field and locate the MSI file. Adding the Product Code to the Deployment Type ensures that the MSI file can be used directly from the content source on a Distribution Point. It’s a great feature, so don’t leave this field empty.

57_9

Deployment Types – Detection Method tab

1. Select the available detection method and click on the Edit Clause… button.
2. Click on Browse and locate the MSI file.
3. Select This MSI product code must exist on the target system and the following condition must be met to indicate presence of this application.
4. Make sure that MSI Property is Version, Operator is Equals and the Value should automatically be filled in.
5. Click on OK.

57_10

Deployment Types – User Experience tab

Depending on if you’re deploying this to users or systems, the settings on this tab will vary. In this post I’ll demonstrate how it’s configured when deploying to systems, but deploy it to the Application Catalog so that users can choose to install the application themselves.
1. Select Install for system, in the Installation behavior drop down menu.
2. Select Whether or not a user is logged on, in the Logon requirement drop down menu.
3. Select Hidden, in the Installation program visibility drop down menu.
4. Configure the Maximum allowed run time (minutes) to 20 and the Estimated installation time (minutes) to 5. The JRE application installation should not take more than 20 minutes to install. The Maximum allowed run time minutes come into account when the client evaluates the deployment to see if there’s enough time left in its assigned maintenance window (if the application would be deployed as required). The Estimated installation time is displayed to the user in the Application Catalog.

57_11

At this point the most important settings have been configured. Click on OK to close the two open windows.

Distribute the application

1. Right-click on the Java Runtime Environment application and choose Distribute Content.
2. Click Next on the General page.
3. Click Next on the Content page.
4. Select your preferred way of either distributing to a Distribution Point or to a Distribution Point Group and click Next.
5. On the Summary page, click Next.
6. Close the wizard by clicking Close.

Deploy the application

1. Right-click on the Java Runtime Environment application and choose Deploy.
2. Select the collection you wish to deploy the JRE application to. In this post we’ll deploy the JRE application to the All Users collection, so that users can choose to install it themselves from the Application Catalog.
3. On the Content page, click Next.
4. On the Deployment Settings page, click Next.
5. Leave the default settings on the Scheduling page and click Next.
6. Click Next on the User Experience page.
7. Click Next on the Alerts page.
8. On the Summary page, click Next.
9. Click on Close.

Create a collection for application management

Once users start to install the application, it would be necessary to keep track of which systems the users have installed the application on. Therefor its recommended to create an collection based on which systems the has the Java Runtime Environment application installed. We’ll do this by querying for the Display Name of the JRE application. Instead of walking through each step of creating a collection, the WQL query statement necessary for such a collection is shown below:

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%"

Now when users go to the Application Catalog, they’ll be able to install Java Runtime Environment. And best of all, you’ll have a collection with all the systems that have Java Runtime Environment installed. This collection could be used as for JRE upgrade deployments whenever a new version is released.

(499)

Nickolaj Andersen

Principal Consultant and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Currently working for TrueSec as a Principal Consultant. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences and user groups.

comments
  • Sem Meijer
    Posted at 09:06 October 18, 2013
    Sem Meijer
    Reply
    Author

    Looks okey, but what about the fact that you should close IE, FF and other browsers before you install java?

    kr
    Sem

    • Nickolaj
      Posted at 09:13 October 18, 2013
      Nickolaj
      Reply
      Author

      Hi Sem,

      You’re right that it would be a good idea to close those applications first. But with this approach in our orginization, I’ve not run into that problem (yet). Wrapping the installer in a VB script that closes all running processes of IE, FF and the other browsers would not be that hard.

      Regards,
      Nickolaj

  • Alan Dooley
    Posted at 13:24 February 7, 2014
    Alan Dooley
    Reply
    Author

    I set this to only install when no user is logged on to cover the IE open problem. Alternatively look into the Powershell Deployment Toolkit which will close IE with a warning.

    • Nickolaj
      Posted at 15:22 February 7, 2014
      Nickolaj
      Reply
      Author

      Hi Alan,

      Great tip about the PDT!

      As with many guides, they should always be intepreted if the method used is applicable in the environment you’re planning to implement it into. In the environment that I work in today this approach has been very successful, and the requirements has been to install the update as soon as possible.

      Regards,
      Nickolaj

  • Moorhead Hawk
    Posted at 15:32 July 9, 2014
    Moorhead Hawk
    Reply
    Author

    I followed your instruction and deployed java in our lab environment. It deploys and installs fine but when I run IE, and verify java, it says either java is not installed or enabled. I double checked browser settings, and it appears java applet is enabled as well. Will appreciate any help on this. What might be causing my java deployment not to work?

  • Pork Tater
    Posted at 21:49 July 21, 2014
    Pork Tater
    Reply
    Author

    I’m also having the same issue — deployed and the deployment appears to be successful, but when attempting to verify Java, it states that it’s not installed or enabled. Java 7 Update 65 appears in Add/Remove Programs. A real head-scratcher, this one.

  • Tom
    Posted at 06:06 November 10, 2014
    Tom
    Reply
    Author

    Hi,

    I need to create the latest JAVA package with the auto update disabled,

    do you have any instruction how i can do that?

    Thanks
    Tom

  • Tom
    Posted at 06:07 November 10, 2014
    Tom
    Reply
    Author

    Sorry the above is to be done by sccm 2012 r2.

    Thanks

    • Nickolaj
      Posted at 07:58 November 13, 2014
      Nickolaj
      Reply
      Author

      Hi Tom,

      I don’t have that specific guide here unfortunately. I recall that I did something like this at a previous customer:

      https://community.oracle.com/thread/2515718

      Perhaps this could help you out. You could leverage Compliance Settings to control this setting on your clients, of simply use a GPO to distribute it.

      Regards,
      Nickolaj

  • mp3juice
    Posted at 18:04 June 4, 2016
    mp3juice
    Reply
    Author

    Hurrah! Finally I got a web site from where I know how to
    really take valuable data regarding my study and knowledge.

  • Leave a Reply