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.

Ben S
  • 68,394
  • 30
  • 171
  • 212

5 Answers5

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.

bmargulies
  • 97,814
  • 39
  • 186
  • 310
  • 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 02 '09 at 00: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 02 '09 at 00: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 '12 at 14:27
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.

Fuhrmanator
  • 11,459
  • 6
  • 62
  • 111
1

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

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
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.

bcdewberry
  • 19
  • 2
  • 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 01 '16 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 '16 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: https://ninite.com/security – bcdewberry Dec 30 '16 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

francoisr
  • 4,407
  • 1
  • 28
  • 48