Oracle has a poor record for making it easy to install and configure Java, but using Homebrew, the latest OpenJDK (Java 14) can be installed with:

brew install --cask adoptopenjdk8

For the many use cases depending on an older version (commonly Java 8), the AdoptOpenJDK project makes it possible with an extra step.

brew tap adoptopenjdk/openjdk
brew install --cask adoptopenjdk8

Existing users of Homebrew may encounter Error: Cask adoptopenjdk8 exists in multiple taps due to prior workarounds with different instructions. This can be solved by fully specifying the location with brew install --cask adoptopenjdk/openjdk/adoptopenjdk8.

Answer from l3x on Stack Overflow

Oracle has a poor record for making it easy to install and configure Java, but using Homebrew, the latest OpenJDK (Java 14) can be installed with:

brew install --cask adoptopenjdk8

For the many use cases depending on an older version (commonly Java 8), the AdoptOpenJDK project makes it possible with an extra step.

brew tap adoptopenjdk/openjdk
brew install --cask adoptopenjdk8

Existing users of Homebrew may encounter Error: Cask adoptopenjdk8 exists in multiple taps due to prior workarounds with different instructions. This can be solved by fully specifying the location with brew install --cask adoptopenjdk/openjdk/adoptopenjdk8.

Answer from l3x on Stack Overflow
🌐
Homebrew
formulae.brew.sh › formula › openjdk@8
Homebrew Formulae: openjdk@8
brew install openjdk@8 · Development kit for the Java programming language · https://openjdk.org/ License: GPL-2.0-only · Development: Pull requests · Formula JSON API: /api/formula/openjdk@8.json · Formula code: openjdk@8.rb on GitHub ...
Discussions

terminal - Recommended way to install Java with brew (just to run Java apps without a development environment) - Ask Different
I saw today: brew install --cask ripme ==> Caveats ripme requires Java 8+. You can install the latest version with: brew install --cask temurin There are so many brew packages for Java, I do... More on apple.stackexchange.com
🌐 apple.stackexchange.com
May 30, 2022
Unable to install Java 8 on MBP M4
Use brew.sh Also Java 8 is… extremely old More on reddit.com
🌐 r/mac
15
2
January 13, 2025
Shall I use Homebrew or SDKMAN to install older versions of Java (e.g. Java 8 or 11)?
I've been using Sdkman for a couple of years. It's a really decent tool. I would recommend it. More on reddit.com
🌐 r/java
35
11
July 6, 2020
Finding OpenJDK 8 binaries for MacOs
You have two good options: https://www.azul.com/downloads/zulu/ : zulu is a build of openjdk made by azul for all platforms adoptopenjdk - they are in fact legit. they are a new distributor of openjdk builds, but they make good ones and also openj9 builds. More on reddit.com
🌐 r/java
16
8
December 27, 2018
🌐
DevQA
devqa.io › brew-install-java
How to Use Brew to Install Java on Mac
In this article we show how to install Java on Mac using Homebrew, and how to allow to switch between different versions such as Java8, Java11, Java13 and latest Java version. Before we start, make sure you have Homebrew installed on your Mac. If not, you can install it via: $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" If you already have brew installed, make sure you have the latest version by running the following command in a terminal
🌐
Medium
erwinschleier.medium.com › install-jdk-8-and-setup-java-home-on-mac-m1-1b0ea243b05a
Install JDK 8 and Setup JAVA_HOME on Mac M1 | by Erwin Schleier | Medium
November 14, 2023 - brew tap adoptopenjdk/openjdk && brew install --cask adoptopenjdk8 · And finally you can install JDK8. Therefore go to: https://www.azul.com/downloads/?version=java-8-lts&os=macos&architecture=arm-64-bit&package=jdk scroll down and download ...
🌐
GitHub
gist.github.com › tomysmile › a9a7aee85ff73454bd57e198ad90e614
How To Install Java 8 on Mac · GitHub
When I run "brew cask info java7" its automatically installing "jdk1.7.0_80" but I need "jdk1.7.0_79". How can I do that? ... java7 is not available (anymore?) afaik. With brew cask search java it's possible to search for what's available related to java ... The instructions worked for me, but I had to call the jenv add commands using sudo. ... openjdk version "1.8...
🌐
Mkyong
mkyong.com › home › java › how to install java jdk on macos
How to install Java JDK on macOS - Mkyong.com
January 19, 2021 - The openjdk is the same as the ... openjdk ==> Formulae openjdk openjdk@11 openjdk@8 · 2.4 We can use the openjdk@8 formula to install Java 8 on macOS....
Find elsewhere
🌐
MAC Address Lookup
aruljohn.com › home › articles › tech
How to Install OpenJDK Java 8 on MacOS using Homebrew in 2025
September 26, 2025 - Enter PIN for 'Certificate For PIV Authentication (Arul John (affiliate))': installer: Package name is AdoptOpenJDK installer: Installing at base path / installer: The install was successful. package-id: net.adoptopenjdk.8.jdk version: 1.8.0_292-b10 volume: / location: install-time: 1758896412 🍺 adoptopenjdk8 was successfully installed! ==> No outdated dependents to upgrade! ... $ java -version openjdk version "1.8.0_292" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode) ... Did this brew command work for you?
🌐
Lonecpluspluscoder
lonecpluspluscoder.com › 2017 › 04 › 27 › installing-java-8-jdk-os-x-using-homebrew
Installing a Java 8 JDK on OS X using Homebrew - The Lone C++ Coder's Blog
April 27, 2017 - Update II - 2019-05-07: It looks like due to the recent licensing changes, the Java 8 JDK that brew used is not directly accessible anymore and likely behind some kind of paywall. The installation method described below will still work as it uses the non-versioned java cask, which installs ...
🌐
Medium
medium.com › @haroldfinch01 › step-by-step-guide-installing-and-switching-java-versions-on-mac-osx-f3896b9872f4
Step-by-Step Guide: Installing and Switching Java Versions on Mac OSX | by Harold Finch | Medium
May 21, 2024 - Install Java 8 · brew install openjdk@8 · Install Java 11 · brew install openjdk@11 · Install Java 17 · brew install openjdk@17 · After installing each version, follow the instructions provided by Homebrew to add the Java versions to your ...
🌐
javaspring
javaspring.net › blog › brew-install-java-8
Mastering `brew install java 8` — javaspring.net
Instead, Java 8 can be installed through Homebrew's Caskroom using brew install --cask temurin8 after adding the homebrew/cask-versions tap.
🌐
GitHub
gist.github.com › pigeonflight › 0d850916aca37b0c4522682c2ca1a332
Installing Java8 on Mac with Homebrew · GitHub
Installing Java8 on Mac with Homebrew. GitHub Gist: instantly share code, notes, and snippets.
🌐
Feliciano
feliciano.tech › blog › install-java8-on-macos
How to Install Java 8 on macOS | Feliciano.Tech
January 24, 2023 - Let's get straight to the “how” and stick around if you want to know the “why”. 1brew tap homebrew/cask-versions 2brew install --cask temurin8 Now here's some information on why this works and what it does.
🌐
Oracle
docs.oracle.com › javase › 8 › docs › technotes › guides › install › mac_jdk.html
JDK 8 Installation for macOS
April 21, 2026 - This page describes how to install and uninstall JDK 8 for macOS computers.
🌐
GitHub
gist.github.com › gwpantazes › 50810d5635fc2e053ad117b39b597a14
How to install different JDK versions on MacOS with Homebrew · GitHub
$ brew install openjdk@8 ==> Fetching downloads for: openjdk@8 ✔︎ API Source openjdk@8.rb [Verifying 9.9KB/ 9.9KB] openjdk@8: The x86_64 architecture is required for this software.
🌐
JanBask Training
janbasktraining.com › community › java › how-to-install-java-8-on-mac
How to install Java 8 on Mac ? | JanBask Training Community
July 26, 2021 - Install whatever version you want with cask brew cask install java8 (or java7 or java if you want to install the latest version, jdk9) Oracle has a poor record for making it easy to install and configure Java, but using Homebrew, the latest ...
🌐
Medium
allenhwkim.medium.com › getting-started-java8-eclipse4-c2467dcb5b8c
Getting Started, Java8+Eclipse4. With Mac, homebrew3, Java8, and… | by Allen Kim | Medium
September 19, 2022 - $ brew install adoptopenjdk8 --cask $ java -version openjdk version "1.8.0_292" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode)
🌐
Medium
medium.com › @srajakash › installing-java8-on-your-mac-os-7523229c2d89
Installing Java8 on your Mac OS 2. Add brew to environment variables by running the following command 3. Install java8 4. Verify the installation by running the below command on terminal Steps 1 and… - Akash V - Medium
April 30, 2022 - Installing Java8 on your Mac OS Install brew using the command /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2. Add brew to environment variables …
🌐
javathinking
javathinking.com › blog › how-to-install-java-8-on-osx-macos-mojave-with-homebrew
How to Install Java 8 on macOS Mojave with Homebrew [Step-by-Step Guide]
If you’re using macOS Mojave (10.14) and need to set up Java 8 for development, testing, or running Java-based software, Homebrew (a popular package manager for macOS) simplifies the process significantly. This guide will walk you through installing Java 8 on macOS Mojave using Homebrew, ensuring you avoid common pitfalls and get up and running quickly.