51

I just got an Java update notification that Update 17 is out, so I ran the update and found that only my public JRE was updated. I still only have Update 16 of the JDK.

Is there a way to have the latest JDK automatically when it's available?

Of course, the update shouldn't get rid of old versions. That should be done manually since Eclipse is still using the old version. Once I've updated my settings I would delete the old JDK manually.

3
  • 1
    Windows: (Win 7 64-bits, but I have the 32-bit JDK)
    – Ben S
    Dec 2, 2009 at 0:45
  • 2
    This looks like an SuperUser or ServerFault question.
    – monksy
    Dec 2, 2009 at 0:46
  • 2
    Nobody on ServerFault seems interested in answering that kind of question: serverfault.com/q/435894
    – Raedwald
    Mar 4, 2013 at 21:12

5 Answers 5

20

Not on Windows. If you are getting your JDK via a linux distro with an auto-updater, you could depend on that. Somehow I doubt that is what you have in mind. I do not believe that there is any Sun-supplied auto-download for the JDK.

3
  • You could write an auto-download script yourself to get the latest JDK installer, just make it a scheduler task and it will run every night. The problem will be installing the new JDK, since I doubt the installer has a non-interactive mode.
    – Nate C-K
    Dec 2, 2009 at 0:49
  • Plus, Sun's Java download site has a few irritating click-through screens using long URL's full of ID's and such before you actually get to download the installer, so even the auto-download part wouldn't be a walk in the park.
    – Nate C-K
    Dec 2, 2009 at 0:57
  • How does Jenkins implement the auto install JDK feature ? I'm not familiar with the Jenkins code, but that is 1 place I know that installs JDK automatically.
    – Parag Doke
    Jul 27, 2012 at 14:27
1

Under OS X this is part of the operating system and is automatically updated. For Windows you must do it yourself.

1
  • 11
    Please note the comment date. This was accurate back in 2009 but is no longer accurate now. Dec 2, 2014 at 18:13
1

Secunia PSI (a free version that runs on a single PC) will update it automatically. Read a review of it here. If you're running both Java 6 and Java 7 JREs (like me), there can be glitches and you still have to update manually sometimes.

1

Ninite is a great website that lets you download the latest version of multiple applications/packages. If you save the installer, it will always pull the most recent version and download/install it without prompts. Reference: https://ninite.com/help/home/update.html

I did this myself just now, only caveat is that I had to delete the older jdk folder in "C:\Program Files\Java" in order for the "java -version" command to recognize the change.

3
  • 1
    Update: I also needed to modify the JAVA_HOME environment variable to run applications that point to it. Windows 7: Control Panel --> System --> Advanced System Settings --> Advanced Tab --> Environment Variables
    – bcdewberry
    Oct 1, 2016 at 15:23
  • With the caveat that no security-conscious computer user would and should ever want to install any application not coming directly from its vendor.
    – Gábor
    Dec 27, 2016 at 12:52
  • I understand your point and agree that one should always be cautious when downloading anything from the internet. That being said, I would urge anyone to research the website for themselves. I have used it for years and it has saved time for countless others. More details on the process: ninite.com/security
    – bcdewberry
    Dec 30, 2016 at 17:32
0

On MacOS, java can now be installed through the Homebrew package manager. After installing Homebrew, you can simply run:

brew cask install java

to install the latest java version. It can then be kept up using

brew cask reinstall java

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.