Updating Java

Posted on 2016-09-16
Medium Priority
Last Modified: 2016-11-12
From an Admin perspective (command line, file locations, config files),
How can I tell where java is installed?
How can I tell if/where there are multiple versions (version6,7,8/x86/x64)?
How can I update from a central source?

I think Java is a simple copy and overwrite, but I am not sure where to, and if I am looking in the right places.
Question by:loftyworm
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 34

Assisted Solution

Michael-Best earned 500 total points
ID: 41802940
Starting with Windows Vista and later versions, when you restart your system, the Windows process jucheck.exe (also known as Java Auto Updater), is initiated and attempts to check for the latest Java version. The Windows User Account Control (UAC) prompts you to allow this process to run.

Infomation from:
LVL 23

Accepted Solution

yo_bee earned 1000 total points
ID: 41802961
  1. I would recommend using Powershell and WMI Queries to locate and uninstall all instances of Java.
  2. Download the offline copy of both x86 & x64.  After version 8.5x or some version close to that you were able to run the exe with some switches to run silently and also remove any older versions of Java.  Save each of these exe's in a central shared location on your network
http://javadl.oracle.com/webapps/download/AutoDL?BundleId=211997 (x86)
http://javadl.oracle.com/webapps/download/AutoDL?BundleId=211999 (x64)

Here is a simple Powershell I put together.  
$javas = Get-WmiObject -Class Win32_Product -Filter "name like 'java%[6-8]%'"
#For an alternative you can also use the IndentifyingNumber as a filter  
#Replace Name with "IndentifyingNumber Like '{26A24AE4-039D-4CA4-%'"
    foreach ($java in $Javas)
        Start-process 'C:\Windows\System32\msiexec.exe' "/x $($java.IdentifyingNumber) /qn" -wait
#This part will run each offline exe in slient mode and will remove all older version
        Start-Process '\\Server\share\Java_i586.exe' "/s REMOVEOUTOFDATEJRES=1" -wait
        Start-Process '\\Server\share\Java_x64.exe' "/s REMOVEOUTOFDATEJRES=1" -wait

Open in new window

Once you have this version of java installed you will not need to use the WMI query to uninstall older versions since the REMOVEOUTOFDATEJRES switch is available
LVL 30

Assisted Solution

serialband earned 500 total points
ID: 41803500
If you want to just find the versions

If Windows is 32 bit, Java is located in Program File\Java\

If Windows is 64 bit, the 32 bit Java is installed in  Program File (x86)\Java\
                  the 64 bit Java is installed in  Program File\Java\
You can see the version in the release file.
Program File (x86)\Java\*\release
Program File\Java\*\release

You can find the list of installed versions in the registry.  

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

LVL 11

Author Comment

ID: 41804930
TY for your comments.  Let me see if I can filter this out;
I am not interested in removing Java necessarily, but know what is there and how to patch it.  So if I read these correctly, what I am hearing is;
  • In order to patch, old versions need to be removed.
  • The default locations for Java will be PF and PF (x86) respectively.
  • There is a file at Program File\Java\*\release
  • The reg key •HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment will also tell

OK, so what about central patching?  Can I just download and extract and copy out the files?  I think this may be bad practice since the folder naming convention may get out of sync, but maybe I could just add the new folder, and adjust a reg key.

Additionally I am told that (when I have to do this manually :P that I have to do the Java control Panel update, and then do it all over again in Firefox.  Seems incorrect to me, but I am the new guy so...

One note to understand, these are workstations that require virtually 100% uptime, so experimenting with them is not an option.  Hence why I am asking what seem to be basic questions.
LVL 23

Expert Comment

ID: 41804966
Do you have to run multiple version and builds of Java.
Ultimately this is not a good practice being that 1.6 and 1.7 are so far out of date.

If you do not need any of the older versions I would recommend you uninstall all previous versions and install the latest.

My response outlines this.

If you are looking to get an inventory you can use WMI to query all your systems for all the versions out there.  This will be a bit time consuming, but can be done.

Are you familiar with WMI at all?
LVL 11

Author Comment

ID: 41810778
I do not need multiple versions of java.
My other questions still remain though.  I guess the simple of it is 'how do I patch/install java remotely'
LVL 23

Expert Comment

ID: 41810782
Using a logon script like the one I posted.
LVL 11

Author Comment

ID: 41810905
Ah ha, I see I am the victim of my impatience once again.  I wasn't thinking of a scripted solution, but a command line.  I see now that I can deconstruct this to do what I.
My apologies, I should have paid closer attention.  TY, this will be great!
LVL 23

Expert Comment

ID: 41810909
No problem and glad it help.

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A procedure for exporting installed hotfix details of remote computers using powershell
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question