failure on installing java on my macbook air 2020

I am trying to install java (jdk-21_macos-aarch64_bin.dmg) on my macbook air 2020 M1 with OS Sequioa but keep getting

error code 1

I’ve tried to do it offline, turning off my firewall etc but nothing works

Is it even possible or am I just wasting my time?

MacBook Air 13″, macOS 15.5

Posted on Sep 24, 2025 7:24 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 26, 2025 12:37 AM

Here’s what worked for me:


Download the ARM64 (aarch64) version – which you’ve done.


Use Terminal to verify installation:

After installing, open Terminal and run:


/usr/libexec/java_home -V

java -version



If it says command not found or throws an error, the install didn’t complete properly.


Try installing via Homebrew

:

This avoids .dmg issues entirely:


brew install openjdk@21



Then link it:


sudo ln -sfn /opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk



Check System Settings > Privacy & Security – If you see a block on Oracle or the JDK installer, allow it manually and retry.


As someone brushing up my Java skills, I recently enrolled in this Java Full Stack Developer course in Online

— it’s been super helpful with real-world projects and hands-on dev environment setup (especially for M1/M2 Macs). Might be worth checking out if you're doing this for learning or career growth

4 replies
Question marked as Top-ranking reply

Sep 26, 2025 12:37 AM in response to lillan290

Here’s what worked for me:


Download the ARM64 (aarch64) version – which you’ve done.


Use Terminal to verify installation:

After installing, open Terminal and run:


/usr/libexec/java_home -V

java -version



If it says command not found or throws an error, the install didn’t complete properly.


Try installing via Homebrew

:

This avoids .dmg issues entirely:


brew install openjdk@21



Then link it:


sudo ln -sfn /opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk



Check System Settings > Privacy & Security – If you see a block on Oracle or the JDK installer, allow it manually and retry.


As someone brushing up my Java skills, I recently enrolled in this Java Full Stack Developer course in Online

— it’s been super helpful with real-world projects and hands-on dev environment setup (especially for M1/M2 Macs). Might be worth checking out if you're doing this for learning or career growth

Sep 24, 2025 7:42 AM in response to lillan290

Out of curiosity. Why do you need to install a separate Java package? Java, for nearly any remaining need for it, is already installed by Apple in the System folder.


The last app I had that used Java was ROES ordering software for Bay Photo. But at least two years back (maybe more) they made that a normal app which no longer required the user to install a separate Java package. Any Java functions it does use, the OS covers.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

failure on installing java on my macbook air 2020

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.