Home > Java > javaTutorial > body text

How to Install Java 8 on Mac Using Homebrew?

Mary-Kate Olsen
Release: 2024-11-02 20:35:03
Original
447 people have browsed it

How to Install Java 8 on Mac Using Homebrew?

Installing Java 8 on Mac using Homebrew

In 2014, installing Java 8 on Mac OS X 9 Mavericks presented a challenge due to Oracle's installer placing files in an unconventional location. However, with Homebrew, it's now straightforward to obtain the latest Java versions.

For Java 14, the command is:

brew install --cask adoptopenjdk8
Copy after login

For older versions like Java 8, AdoptOpenJDK provides a separate tap:

brew tap adoptopenjdk/openjdk
brew install --cask adoptopenjdk8
Copy after login

Workaround for Homebrew Users

If you encounter the error "Cask adoptopenjdk8 exists in multiple taps," specify the location explicitly:

brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
Copy after login

Why Oracle's Installer Fails

Oracle's installer historically has been unreliable for installing Java on Mac. Homebrew, however, offers a more robust and consistent solution for managing Java installations.

The above is the detailed content of How to Install Java 8 on Mac Using Homebrew?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template