?
Solved

Updating Java

Posted on 2016-09-16
9
Medium Priority
?
196 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 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:
https://java.com/en/download/help/java_update.xml
0
 
LVL 23

Accepted Solution

by:
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
0
 
LVL 30

Assisted Solution

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

https://stackoverflow.com/questions/6493856/how-to-programatically-get-all-java-jvm-installed-not-default-one-using-java
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

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
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Suggested Courses

649 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