Should I run brew or update Java via the Web or some other method?
Asked
Active
Viewed 6.1k times
19
-
This is not install but upgrade. – Joe Aug 16 '17 at 04:30
-
@Joe ... but the answer is the same. – Stephen C Aug 16 '17 at 05:22
-
first update the cask from terminal with help of brew (assuming brew is setup in Mac), following code will be used to update the java brew tap caskroom/versions brew cask install java8 OR brew cask install java10 – Vivek Chaudhari May 09 '18 at 05:11
-
Depends on which distribution you use. Some come as a package, others as a disk image and others as a zip file. – Thorbjørn Ravn Andersen May 20 '21 at 16:59
2 Answers
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.

OLIVER.KOO
- 5,654
- 3
- 30
- 62
-
28Is 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
-
1In 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