27

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

4
  • This is not install but upgrade. Commented Aug 16, 2017 at 4:30
  • @Joe ... but the answer is the same. Commented Aug 16, 2017 at 5: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 Commented May 9, 2018 at 5:11
  • Depends on which distribution you use. Some come as a package, others as a disk image and others as a zip file. Commented May 20, 2021 at 16:59

2 Answers 2

30

The Answer

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


The OLD Answer (no longer works)

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

Sign up to request clarification or add additional context in comments.

3 Comments

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 Yes it's not accurate anymore, They removed Java Control Panel in Java 11. stackoverflow.com/a/53176853/1263512
In 2022 (JRE 19), the direct link for downloading is oracle.com/java/technologies/downloads/#jdk19-mac, extract, install and you're done.
8

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.

2 Comments

the java page is a mess...
And the required signup to download

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.