Solved

Updating Java

Posted on 2016-09-16
9
85 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
9 Comments
 
LVL 34

Assisted Solution

by:Michael-Best
Michael-Best earned 125 total points
Comment Utility
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 21

Accepted Solution

by:
yo_bee earned 250 total points
Comment Utility
  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 27

Assisted Solution

by:serialband
serialband earned 125 total points
Comment Utility
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
 
LVL 11

Author Comment

by:loftyworm
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 21

Expert Comment

by:yo_bee
Comment Utility
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
Comment Utility
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 21

Expert Comment

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

Author Comment

by:loftyworm
Comment Utility
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 21

Expert Comment

by:yo_bee
Comment Utility
No problem and glad it help.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
A procedure for exporting installed hotfix details of remote computers using powershell
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now