Solved

Updating Java

Posted on 2016-09-16
9
140 Views
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.
0
Comment
Question by:loftyworm
[X]
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
9 Comments
 
LVL 34

Assisted Solution

by:Michael-Best
Michael-Best earned 125 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:
https://java.com/en/download/help/java_update.xml
0
 
LVL 23

Accepted Solution

by:
yo_bee earned 250 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
0
 
LVL 29

Assisted Solution

by:serialband
serialband earned 125 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.  

https://stackoverflow.com/questions/6493856/how-to-programatically-get-all-java-jvm-installed-not-default-one-using-java
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  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

by:loftyworm
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.
0
 
LVL 23

Expert Comment

by:yo_bee
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?
0
 
LVL 11

Author Comment

by:loftyworm
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'
0
 
LVL 23

Expert Comment

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

Author Comment

by:loftyworm
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!
0
 
LVL 23

Expert Comment

by:yo_bee
ID: 41810909
No problem and glad it help.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

739 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