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
🌐
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.
Discussions

java - Will x64 jdk-1.8 work in Mac with Apple Silicon (M1) Chip? - Stack Overflow
Arm64 jdk-8 is currently unavailable currently. ... Save this answer. ... Show activity on this post. Homebrew does not support OpenJDK@8 on Apple Silicon (M1/M2) but Zulu Community 8 is present as a cask. You just have to enable cask-versions repository and install zulu8 cask. Copybrew tap homebrew/cask-versions brew install --cask zulu8 · It will install the JDK in /Library/Java... More on stackoverflow.com
🌐 stackoverflow.com
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
macos - Java/JDK for the Apple Silicon chips - Stack Overflow
Native Apple/Arm64 versions are now available on brew, so you should be able to just do brew install java, provided you install brew natively without using Rosetta 2. More on stackoverflow.com
🌐 stackoverflow.com
On M1 Mac : Hive has a dependancy on openjdk@8 (which is no longer available)
brew gist-logs link OR brew config AND brew doctor output brew install hive will fail with an error saying that dependancy openjdk@8 On my new mac which has an M1 processor, I get t... More on github.com
🌐 github.com
6
September 1, 2022
🌐
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 ...
🌐
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 ...
🌐
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.
Find elsewhere
🌐
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.

Top answer
1 of 16
211

A command line approach (thanks to the Homebrew team and the hard work of @vladimir-kempik and other openjdk contributors on the JEP-391 branch)

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install OpenJDK
brew install openjdk

Verify it's installed:

$(brew --prefix openjdk)/bin/java --version

Verify it's for the arm64 hardware:

file $(brew --prefix openjdk)/bin/java     
# /opt/homebrew/opt/openjdk/bin/java: Mach-O 64-bit executable arm64

Note: To install openjdk system-wide, follow the on-screen instructions provided by Homebrew.

2 of 16
127

Yes.

On this page: AdoptOpenJDK Latest Releases you can select 'macOS' from the 'Operating System' dropdown, and then from 'Architecture', it's currently only x64, but soonish there should be AArch64 or ARM64 (those are usually the shortcodes for 64-bit ARM). Possibly, as Apple no doubt has a bunch of extensions built into their M1 designs, and Apple gets its own.

If you instead leave Operation System on 'any', you'll note aarch64 is in there, and this gets you to a Linux release for ARM processors. That (probably) won't run on macOS on M1 hardware, but that's 95% of the work already done.

So: It's not there yet, but note that JDKs for ARM have been available for more than decade, and whilst JDK 15 has dropped support for a bunch of exotic OS/architecture combinations (such as Solaris), ARM development has always remained at least partially relevant (even if so far it's mostly an Oracle commercial license offering). That is to say: It should not be a herculean effort to create an adoptopenjdk release that runs on M1s natively, so presumably, it will happen. But, it's an open source effort, so if you're anxious, by all means, read up and contribute :)

Apple has not given any details on this architecture whatsoever until November 10th 2020, unless you bought a development kit box for it (a Mac Mini with an A14 chip, which isn't an M1 chip, but close enough I guess), and signed a big NDA.

As a rule, open source projects will run as fast as possible in the opposite direction if you wave an NDA around, so if you dislike this state of affairs, I don't think it's wise to complain to adoptopenjdk or other packagers and open source projects about it :)

Fortunately, now it's out, and an NDA is no longer required. My assumption is that the ARM branch of the OpenJDK source code + the macOS bits that already exist for the macOS x64 release can be combined rather easily once someone with some familiarity with the OpenJDK source code has an M1-based macOS system to test it on, which should mean an adoptopenjdk macos-aarch64 release should be here within the month.

But, open source. You didn't pay them, you have no contract, and they don't owe it to you. Donate to the effort or contribute a pull request if you want it to go faster.

UPDATE:

  • Azul's M1 OpenJDK builds
  • Microsoft's (yes, really) GitHub source repo for an early access OpenJDK16 build for macOS on AArch64. Note that Microsoft's been working on the OpenJDK branch of AArch64 (for ARM-based Windows 10) for a while, which goes back to: A lot of the hard work was already done.
🌐
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, ...
🌐
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.
🌐
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 - Note: OpenJDK 8 is only available for x86_64 architecture, so you will get an error if you are on ARM M1/M2 Chip. openjdk@8: The x86_64 architecture is required for this software. 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
medium.com › @kkrajpurohit007 › install-jdk-multiple-version-on-apple-silicon-chip-m1-m2-9a9d90954be3
Install JDK multiple version Apple Silicon chip (M1/M2) | by kkrajpurohit | Medium
July 16, 2023 - Installing jdk 11 and 8 $ brew install — cask adoptopenjdk11 adoptopenjdk8 · Installtion running command in terminal if asking during instllation of jdk8 and jdk11 $ softwareupdate — install-rosetta ... add these two commands in zshrc $ ...
🌐
javaspring
javaspring.net › blog › brew-install-java-8
Mastering `brew install java 8` — javaspring.net
Java 8 was released in March 2014 ... and it is still used in many enterprise applications. Homebrew does not provide a direct brew install java 8 command....
🌐
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
🌐
Homebrew
formulae.brew.sh › formula › openjdk
Homebrew Formulae: openjdk
brew install openjdk · Also known as: java, openjdk@26 · Development kit for the Java programming language · https://openjdk.org/ License: GPL-2.0-only WITH Classpath-exception-2.0 · Development: Pull requests · Formula JSON API: /api/formula/openjdk.json ·
🌐
MAC Address Lookup
aruljohn.com › home › articles › tech
How to Install OpenJDK Java 8 on MacOS using Homebrew in 2025
September 26, 2025 - $ brew install --cask adoptopenjdk/openjdk/adoptopenjdk8 ==> Auto-updating Homebrew... Adjust how often this is run with `$HOMEBREW_AUTO_UPDATE_SECS` or disable with `$HOMEBREW_NO_AUTO_UPDATE=1`. Hide these hints with `$HOMEBREW_NO_ENV_HINTS=1` ...
🌐
Mac Install Guide
mac.install.guide › java › apple-silicon
Java on Apple Silicon or Intel Macs · Mac Install Guide · 2026
To install Java 8 for Apple Silicon using the Homebrew cask method: ... Both distributions provide fully native ARM64 builds of Java 8, so you get full performance without Rosetta translation.
🌐
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.
🌐
GitHub
github.com › Homebrew › homebrew-core › issues › 109379
On M1 Mac : Hive has a dependancy on openjdk@8 (which is no longer available) · Issue #109379 · Homebrew/homebrew-core
September 1, 2022 - brew install hive will fail with an error saying that dependancy openjdk@8 On my new mac which has an M1 processor, I get the above error. I cannot install openjdk@8 using brew. In the past on an non-M1 mac I used to be able to do this. Looking into this , openjdk is now deprecated .
Author   Homebrew