Client Management Suite

 View Only

Updating to Java 8 through Managed Software Delivery Policy 

Jan 26, 2015 02:09 PM

I previously wrote up my process as an article for installing Java 7 update 51 as a manged software delivery.  Figured I’d do another article for java 8 for a spot to crowdsource from the community as I always learn from comments how to improve how I do things in CMS.  Don't forget support for Java 7 ends in April!

Download the latest offline .exe installer (you won’t see the 64 bit offline installer unless using 64 bit windows).  Note that Oracle recommends 32 bit Java unless for some reason you use 64bit browsers - we use the 32 bit download.

 

  1. Extract the MSI
    1. Download and launch in GUI mode the Windows Offline Installation executable (.exe) file. 
    2. When Welcome to Java window appears do not click Install button and navigate to LocalAppData folder (the user Application Data folder). The location of the LocalAppData folder differs for each Windows platform. 
       
    3. You can also navigate directly to APPData folder by typing : %APPDATA% in Windows Explorer Address Bar or Run. 
       
      1. Windows Vista and Windows 7
        C:\Users\<user>\AppData\LocalLow\Sun (or Oracle)\Java\jre<version_number>
      2. Windows XP
        C:\Documents and Settings\<user>\Local Settings\ApplicationData\Sun (or Oracle)\Java\jre<version_number>
      3. Windows 2000
        C:\Documents and Settings\<user>\ApplicationData\Sun (or Oracle)\Java\jre<version_number>   
  2. Copy .msi to folder to folder on desktop
  3. Create (or copy existing if you have them already C:\Windows\sun\java\deployment\) deployment.config and deployment.properties file to same folder where .msi is, these are plain text files.

    Our deployment.config file contains these 2 lines
    deployment.system.config.mandatory=true
    deployment.system.config=file:\\C\:\\Windows\\Sun\\Java\\Deployment\\deployment.properties

    Our deployment.properties file is following
    deployment.expiration.check.enabled=false
    deployment.security.mixcode=HIDE_RUN
    deployment.javaws.shortcut.locked
    deployment.javaws.shortcut=NEVER   

    You can add more options to the properties file based on what’s available in the current release. See http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/properties.html

    The folder on the desktop should now have 3 files, deployment.config, deployment.properties, & .msi file.

    Note: As of Java 8u20, there is no more Medium security level support. Any sites that don’t conform to Java’s security practices will be blocked. If you have sites in your organization you want to whitelist, you can do so with a third text file exception.sites. Make sure to set the deployment.user.security.exception.sites value in deployment.properties if you do this. I am not using that as our high profile sites all loaded without it, but you can get more info here

  4. Open CMS and navigate to Manage – Software Catalog - Import
  5. Click plus button and navigate to folder where all 3 java related files exist, select all files and then select open
  6. Make sure .msi file is bolded, if not highlight it and select “Set Installation File”
  7. Select Next, files upload to CMS.  Edit name, etc as desired. Leave checkbox checked for edit software resource… Select OK.
  8. On package tab, delete Install, install no IU and install for all users leaving just Install for all users with no UI/Repair/Uninstall options (not necessary).  We edit our “Install for all users with no UI” command line to be msiexec.exe /i "jre1.8.0_31.msi" AUTOUPDATECHECK=0 IEXPLORER=1 JAVAUPDATE=0 JU=0 MOZILLA=1 /qn ALLUSERS=2

    Note: I originally had IEXPLORER and MOZILLA keys in the command line, but they didn’t end up in the registry, so I don’t think they’re supported anymore, so I removed them. Anyone know if any of that is documented anywhere?

  9. Detection rule is auto created.  For Applicability, enter as needed (I leave mine at default).  Click OK to save.
  10. Navigate to your CMS sharepoint \\cms\SoftwareLibrary and find the UUID of the folder uploaded (latest time /date stamp).  This is the same UUID folder name that gets copied locally to workstation when rolling out.
  11. Create command script task to copy deployment files to right location.  My script also includes lines to delete javaUpdate registry file if it exists because some people had this from previous versions and the Java 7 51 installer wasn’t clearing it and leaving the update tab in the control panel app.    Here’s example script – replace 9f283b6e-34b5-4e23-a171-82d3axxxxxxx with the UUID from step 10.

    xcopy "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery\{9f283b6e-34b5-4e23-a171-82d3axxxxxxx}\cache\deployment.config" C:\Windows\sun\java\deployment\ /y
    xcopy "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery\{9f283b6e-34b5-4e23-a171-82d3axxxxxxx }\cache\deployment.properties" C:\Windows\sun\java\deployment\ /y
    reg add "HKLM\Software\JavaSoft\Java Update\Test"
    reg delete "HKLM\Software\JavaSoft\Java Update" /f

  12. Create vbscript to remove previous versions of Java if needed.  I was going from Java 8 from 7 and the 8 installer doesn’t remove Java 7.  I got my script from “serverkudsk” comment in this thread .  I changed the line strCurrentVersion line to be “strCurrentVersion = "Java(TM) 8 Update 31"”, this script removes all versions of java on machine below 1.8.31.  Update 8/20/15 - I'm now using the script posted by Darren Collins in this thread because I was having issues with Java 8 versions not uninstalling properly.
  13. Create Managed software delivery Policy with 2 scripts and add software task.  If you’re not 7.5, consider adding a task to delete software cache (this regenerates the software listed in inventory, there was a bug in 7.1 where old software doesn’t get removed unless you clear cache), and then run a software inventory scan.  7.5 fixes this bug and Delete SoftwareCache is no longer needed.  Set applied to and schedule.

       

 

     This is what my policy looks like

             java 8 policy.PNG

Installing java with the browser opened seems to continue to cause issues.  I saw some machines in add/remove programs saying the app was installed, but it didn’t work in the browser and there was no control panel icon.  So, I set the policy to only run if no user logged in under schedule – advanced options

java7u51b.PNG

I also set the advanced settings for the software install to only run “only when no user is logged on.”  This is probably not necessary, but I thought it was a failsafe.

Java8advancedoptions.PNG

Our users typically leave machines in locked or powered off states, so my plan is to leave these ‘install at logout’ precautions in place for a week or 2 and then eventually set it to run whenever for all users not yet updated and deal with the corrupted installs that happen manually.  I’m happy so far in first few days of policy being on about half of users have been updated.

To maintain Java, I have some filters set up. 

  1. Static filter for “Needs Latest Java” that is maintained at our helpdesk level so if someone calls in needing java, they get added to the static filter.
  2. Dynamic filter for “Has Java 8 Update 31” that just checks for latest version of Java.  This is built easily in software section of CMS by right clicking on your software resource selecting action, create installed software filter.
  3. Dynamic filter for “Waiting for Latest Java Install” that includes all machines in “Needs Latest Java” except those also in “Has Java 8 Update 31”.  This is the filter the managed software delivery policy gets scoped to.
  4. Static filter for “Needs Outdated Java” for 2-3 users that require an old version of Java for a specific app also maintained by helpdesk
  5. Dynamic filter for “Has Java Installed” that is based on SQL query below that some nice person on Connect probably helped me do

    SELECT sw._ResourceGuid [Guid]
    FROM [vSoftwareComponent] sc
    inner join [Inv_InstalledSoftware] sw
    on sw.[_SoftwareComponentGuid] = sc.[Guid]
    where sc.[Name] LIKE '%JAVA%'
    and sw.[InstallFlag]=1

  6. Finally, a dynamic filter “Remove Java” that is based on ‘Has Java Installed’ but excludes ‘Needs Outdated Java’ and also excludes ‘Needs Latest Java’.  This I scope a policy with script to remove Java for everyone who isn’t approved to have it.  This policy runs with update software inventory as well so users fall out of the dynamic group after uninstall is successful.

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Jan 22, 2019 08:54 AM

Java 8 update 201 came out last week.  Please be aware of new licensing rules with Java 8 for non personal use.

The public availability of Java SE 8 updates from Oracle has been extended to January 2019.  Oracle will continue to provide consumers with updates for personal (non-corporate, non-commercial) use of Java SE 8 through at least the end of 2020.  Applets will continue to be supported in Java SE 8 until at least March, 2019, pending continued support by browser vendors, after which they may be removed at any time.

Java Client roadmap - http://www.oracle.com/technetwork/java/javase/javaclientroadmapupdate2018mar-4414431.pdf

 

“Public updates for Oracle Java SE 8 will remain available for individual, personal use through at least the end of 2020.  Public updates for Oracle Java SE 8 released after January 2019 will not be available for business, commercial or production use without a commercial license.”

https://java.com/en/download/release_notice.jsp

 

 

Oct 16, 2018 01:31 PM

Java 8 update 191 is out

Jul 17, 2018 01:56 PM

java 8 update 181 is out.

Apr 20, 2018 07:29 AM

Java 8 update 171 is out.

Jan 17, 2018 09:06 AM

Java 8 update 161 is out.  

Oct 17, 2017 02:28 PM

java 8 update 151 is out.

Jul 27, 2017 08:39 AM

8u144 was released.

Jul 19, 2017 07:24 AM

Java SE Runtime Environment 8u141 is out.

Jan 17, 2017 03:36 PM

FYI - Java 8 update 121 is out.

Dec 21, 2016 12:13 PM

Not seen that before either, but since it relates to Java SE I suspect that would be a licensable product i.e. Oracle will come asking for money to use it, as per the Register article I linked to.  Sneaky that it doesn't state anywhere that it is, but I think that's the reason many of Oracle's customers are angry about this.

Dec 21, 2016 11:47 AM

@chris - have you ever seen this document before? I hadn't, but it looks like you may be able to use the .exe on that webpage and customize the installer via a config file?  Am I missing something obvious? haven't had a chance to try it.

http://docs.oracle.com/javase/8/docs/technotes/guides/install/config.html

Dec 20, 2016 12:46 PM

I wonder how Java feels about people pushing the pkg installer for JRE for Macs.  No mention of that anywhere that I can find.  

Dec 19, 2016 12:04 PM

Not sure if anyone else is aware, but it seems that Oracle are trying to force it's Enterprise customers to sign up for their Support services in order to get future MSI installers for common components like JRE.

See this page: https://www.java.com/en/download/help/msi_install.xml

Note the bit at the very bottom that says:

Although information is available in the public domain explaining steps to extract the .msi file from the installer for deployment through Active Directory based network, this practice is unsupported, installations done using this method might not work correctly, and Oracle can not guarantee that future Java updates will continue to allow extracting the .msi file.

On top of that it also seems they are deploying an army of auditors to ensure that the components that you are using are licenced properly (or that you have a corresponding support contract):

http://www.theregister.co.uk/2016/12/16/oracle_targets_java_users_non_compliance/

At the moment I think the MSI extractable .exe still works.  But for how long?  Anyone using the Enterprise JRE MSI Installer (the one you have to pay for)?  Does it offer anything different?

Jul 20, 2016 04:52 PM

We are getting ready for a mass Java update here. Just some info to pass along...

You can use REMOVEOLDERJRES=1 in the command line to remove older versions within the same version family. Just tested and it works. We had Java 8 Update 77 on a machine and ran Java 8 Update 101 and it removed Update 77 and replaced with 101.

Jul 20, 2016 08:13 AM

Java 8 update 101/102 is available at links in original post.  The file location of the msi didn't change for me.

 

Note: if you right click on the .exe and do run as administrator (or another user), you'll need to look for the file in that other user's locallow folder.

Jul 18, 2016 11:21 AM

@chrismcevoy72 - sorry, for some reason I didn't get email updates on new posts in this thread.  The new version of java should drop tomorrow.   I'll post back if I have trouble getting the MSI on the new version.

Jul 05, 2016 11:26 AM

I just used the usual installer from java.com, tried it a few days ago and the MSI was definitely available in the appdata path I mentioned above.  Maythe problem is with the offline installer?

Jul 04, 2016 04:25 AM

I downloaded the offline installer and no matter how I try there is no longer an msi file. I have run the exe and left it at the welcome screen and gone to the path provieded and the only version I can see is 8.72. It seems as if Orcale have released the latest version so it no longer creates an msi file. I have even tried doing a search on the drive but to no avail.

Jul 01, 2016 12:22 PM

Download the .exe file from the java.com website and run it so that it gets to the first installation screen (no need to install it - just so that the "Welcome to Java" screen appears).  

With that screen still running, navigate to c:\users\username\appdata\locallow\oracle\java and there will be a folder for the version you have downloaded - inside that folder is the .msi files.  

Simply copy those files to a folder of your choice and use them for your software resource upload following the instructions in the main post of this thread.

 

Jul 01, 2016 10:33 AM

I'm struggling to find the .cab and msi file for 8.91, it's not appearing in the folder, I can see previous files I created before for other releases.

Has Oracle changed the way that is now installed?

Apr 19, 2016 05:03 PM

bump for java 8u91 released today

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Feb 09, 2016 10:57 AM

bump for 8u73 available now

Jan 26, 2016 01:11 PM

FYI java 8 update 71/72 came out last week for anyone who may have missed it.

Oct 22, 2015 11:53 AM

yea thanks eventually a friend pointed me to these helpful links.  

http://www.oracle.com/technetwork/java/javase/cpu-psu-explained-2331472.html

https://www.java.com/en/download/faq/release_dates.xml

Oct 21, 2015 10:06 PM

The version depends on which patch type you decided to go with previously.

Oct 21, 2015 08:13 AM

Update - new Java updates came out yesterday.  I'm not sure why, but 8u65 and 8u66 both came out at the same time.

http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Aug 24, 2015 09:42 AM

Thank you for catching this. This was why I couldn't find the MSI file. Looks like Oracle tried an end-run around all the instructions on the web, hoping people would pony up for the subscription that gives you the MSI directly.

Aug 24, 2015 07:26 AM

thanks - i updated paths in the article. I just flew past that not even noticing the change.

Aug 24, 2015 04:51 AM

Now the Path has changed to the msi file in my case. The folder ist no longer "Sun", now its "Oracle".

C:\Users\<User>\AppData\LocalLow\Oracle\Java\jre1.8.0_60

 

Aug 22, 2015 08:50 AM

C:\Users\<user>\AppData\LocalLow\Sun\Java\jre1.8.0_60 folder.  I sent it out this week and didn't have any problems.  The only way that folder will be there is if you opened the .exe installer (but didn't run it), just opened it.

Aug 21, 2015 05:36 PM

I try to follow the steps with 8u60, but all I see in the ...\Sun\Java\jre1.8.0_31 folder is an LZMA_EXE file. No MSI anywhere.

Aug 20, 2015 11:28 AM

I used to use a transform but found command line easier to edit with update.  One less file to touch.

Aug 20, 2015 08:55 AM

Sally:

Have you tried using orca to make a transform with the properties set for what you're doing with the MSI command line:

 

msiexec.exe /i "jre1.8.0_31.msi" AUTOUPDATECHECK=0 IEXPLORER=1 JAVAUPDATE=0 JU=0 MOZILLA=1 /qn ALLUSERS=2

Note: I originally had IEXPLORER and MOZILLA keys in the command line, but they didn’t end up in the registry, so I don’t think they’re supported anymore, so I removed them. Anyone know if any of that is documented anywhere?

Aug 20, 2015 08:53 AM

Did you try the steps Sally outlined:

 

  1. Extract the MSI
    1. Download and launch in GUI mode the Windows Offline Installation executable (.exe) file. 
    2. When Welcome to Java window appears do not click Install button and navigate to LocalAppData folder (the user Application Data folder). The location of the LocalAppData folder differs for each Windows platform. 
       
    3. You can also navigate directly to APPData folder by typing : %APPDATA% in Windows Explorer Address Bar or Run. 
       
      1. Windows Vista and Windows 7
        C:\Users\<user>\AppData\LocalLow\Sun\Java\jre<version_number>
      2. Windows XP
        C:\Documents and Settings\<user>\Local Settings\ApplicationData\Sun\Java\jre<version_number>
      3. Windows 2000
        C:\Documents and Settings\<user>\ApplicationData\Sun\Java\jre<version_number>

Aug 19, 2015 08:15 AM

java 8 update 60 out.  expires Oct 20th (same expiration date we had for 8u51).

Aug 03, 2015 09:45 AM

You can use an 7-Zip or another zipping program to extract the msi from the exe

 

or you can try the silent switch with the exe

 

jre-8u51-windows-i586.exe /s

Aug 03, 2015 07:54 AM

The latest version of Java does not have an MSI unless you buy a license. How woud I do this with an exe?

Jan 28, 2015 11:44 AM

We actually just download the package and config files to a temporary folder and then copy the config files from there - it just means we don't have to keep editing the copy file script. But thinking about it, delivering the package to c:\windows\sun\java\deployment\ might work also, and save us from needing to copy the config files at all. Hmmm....I'll try that....

Jan 27, 2015 12:19 PM

Never knew that existed.  I'll take a look.  So you just leave the .msi file in the C:\Windows\sun\java\deployment\ directory with the config files?  Thanks for sharing, may make the process a bit simpler moving forward.

Jan 27, 2015 05:12 AM

Thanks for this Sally - very useful.  It's something we'll be doing before the April deadline for Java 7.  Have you thought about using the static download location for the package (Advanced setting in the policy or the quick delivery), so that you don't have to use the cache UUID for the deployment config files script?  

customlocation.png

This is something we've done and it works well.  It just means you don't have to keep editing the dependent task scripts everytime there is a new version, as long as you use the same temporary location on the client everytime.  Just a thought.

Related Entries and Links

No Related Resource entered.