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
java.com › en › download › help › mac_install.html
How do I install Java for my Mac?
The screen shots and instructions below are for Java 8 Update 311 (8u311). If you are installing another version, make sure you change the version number appropriately. Example: For Java 8 Update 311 (8u311) the file to download is jre-8u311-macosx-x64.dmg · To confirm installed Java version, ...
Discussions

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
How to install Java 8 on osx macOS Mojave with Homebrew? - Stack Overflow
At the moment Java 8 is still required for some apps like: Android SDK / Android Studio Jenkins Ionic ... With brew install java the latest Version is installed. But how to install Java 8? More on stackoverflow.com
🌐 stackoverflow.com
Installing JDK on a new mac

I'd recommend homebrew for package management in general and sdkman for java (and related ecosystem) development tools.

More on reddit.com
🌐 r/java
17
21
December 8, 2017
What is the easiest way to install Java 11 on Macos?
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/javahelp
9
3
June 15, 2022
🌐
DevQA
devqa.io › brew-install-java
How to Use Brew to Install Java on 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
🌐
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.
🌐
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.
🌐
GitHub
gist.github.com › tomysmile › a9a7aee85ff73454bd57e198ad90e614
How To Install Java 8 on Mac · GitHub
The above command will create a .java-version file at project root. Its content is the version I just picked for this project: ... it needs to be added in order to work else you'll be getting /.jenv/versions/oracle64-1.7.0.80: No such file or directory ... Thanks, great write up! ... When I run "brew cask info java7" its automatically installing "jdk1.7.0_80" but I need "jdk1.7.0_79".
🌐
Reddit
reddit.com › r/mac › unable to install java 8 on mbp m4
r/mac on Reddit: Unable to install Java 8 on MBP M4
January 13, 2025 -

Hello,

I need Java for some applications and I just downloaded the latest Java installer (jre-8u431-macosx-aarch64) from Oracle aaand … it's not installing. It tries to install and says something like java could not be installed and "OS error code 1".

I searched for hours on Google and couldn't find anything. Did anyone have a solution to this? I'm running Sequoia 15.2.

Find elsewhere
🌐
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 - echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/vishal/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)" ... Next of course, you have to install Java if not already done. ... 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 the .dmg file than execute it.
🌐
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 …
🌐
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.
🌐
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 ...
🌐
MAC Address Lookup
aruljohn.com › home › articles › tech
How to Install OpenJDK Java 8 on MacOS using Homebrew in 2025
September 26, 2025 - It will fail if you do not have admin rights. The homebrew command to install Adopt OpenJDK 8 or 1.8 keeps changing. ... $ brew install --cask adoptopenjdk/openjdk/adoptopenjdk8 ==> Auto-updating Homebrew...
🌐
CodingTechRoom
codingtechroom.com › question › install-java-8-macos-homebrew
How to Properly Install Java 8 on macOS Using Homebrew? - CodingTechRoom
Changes in Homebrew's approach to managing Java versions and their respective casks. Use the AdoptOpenJDK cask to install Java 8 via the command: `brew install --cask adoptopenjdk8`
🌐
DEV Community
dev.to › shane › configure-m1-mac-to-use-jdk8-with-maven-4b4g
Configure M1 Mac to use JDK8 with Maven - DEV Community
July 10, 2023 - You can instructions on downloading Brew here https://brew.sh/ or by simply running this script in your terminal · /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ... We need to get a version ...
🌐
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 ...
🌐
Code2care
code2care.org › home › java › install openjdk java (8/11/17) versions using brew on mac (intel/m1/m2)
Install OpenJDK Java (8/11/17) versions using brew on Mac (Intel/M1/M2) | Code2care
January 26, 2026 - Error: openjdk@8: An unsatisfied requirement failed this build. You will need to go for other vendors like azul. brew tap homebrew/cask-versions brew install --cask zulu8 Installing Java JDK 11
🌐
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 - Getting Started, Java8+Eclipse4 With Mac, homebrew3, Java8, and Eclipse4 0. Install homebrew if not installed You can skip this process if you have already installed homebrew $ brew update # to check …
🌐
GitHub
gist.github.com › gwpantazes › 50810d5635fc2e053ad117b39b597a14
How to install different JDK versions on MacOS with Homebrew · GitHub
Copy link · Copy Markdown · on macOS Tahoe 26.1, Apple M4 Max: $ 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.
🌐
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]
Java 8 is installed in /Library/Java/JavaVirtualMachines/. List the installed JDKs to confirm the path: ... Expected Output: You’ll see a folder named adoptopenjdk-8.jdk (e.g., adoptopenjdk-8.jdk). macOS Mojave uses bash by default (though ...