19

Should I run brew or update Java via the Web or some other method?

bfontaine
  • 18,169
  • 13
  • 73
  • 107
Joe
  • 11,983
  • 31
  • 109
  • 183

2 Answers2

19

You can update Java by downloading the newer version from Oracle directly When you install the installer would delete the older version for you.

Or you Mac has built in system that would fetch and update java from Oracle for you for you. Go to System Preference > Java > Update > Update Now. It would also be a good idea to turn on "Check for Updates Automatically" that way when a newer version of Java comes out your Mac would ask you to install it and it becomes a simple one click install.

enter image description here

OLIVER.KOO
  • 5,654
  • 3
  • 30
  • 62
  • 28
    Is this still accurate? On my mac with MacOS Mojave, there is no Java Preferences pane anymore, although I seem to have a java installed at /Library/Java/JavaVirtualMachines/ – Marvin Sep 18 '19 at 14:59
  • 1
    @Marvin Yes it's not accurate anymore, They removed Java Control Panel in Java 11. https://stackoverflow.com/a/53176853/1263512 – hendra Jul 04 '22 at 04:31
  • 1
    In 2022 (JRE 19), the direct link for downloading is https://www.oracle.com/java/technologies/downloads/#jdk19-mac, extract, install and you're done. – Vadorequest Dec 09 '22 at 10:42
7

Just go to the java page and download the latest version. Upon starting the installation process, the installer automatically detects your current java version, either deletes it and does a complete reinstall or just updates your version.

Xaphas
  • 501
  • 4
  • 20