avatardatatec.studio

Summary

This article explains how to install OpenJDK 17 on macOS.

Abstract

This article provides a step-by-step guide for installing OpenJDK 17 on macOS. The author assumes that the reader may not know which Java version they currently have on their laptop. The process involves removing existing Java installations, installing Homebrew, uninstalling OpenJDK 11, installing OpenJDK 17, and creating a symbolic link to the new installation. The article concludes by asking readers to like or follow the author's Medium blog if they found the post helpful.

Opinions

  • The author assumes that the reader may not know which Java version they currently have on their laptop.
  • The author provides a step-by-step guide for installing OpenJDK 17 on macOS.
  • The author concludes by asking readers to like or follow their Medium blog if they found the post helpful.

Install OpenJDK 17 on MacOS

17

Oracle JDK 17 ist currently the latest Long-Term Release of Java SE.

The Oracle JDK and OpenJDK builds are essentially identical from Java 11 onward. If you would like to know the different between them, there are lot of summary on the internet. e.g., the one from baeldung: Differences Between Oracle JDK and OpenJDK.

In this article, we will learn how to install OpenJDK on macOS.

In my previous blog, i have introduce you about 3 Steps to install OpenJDK 11 on macOS.

Actually, to install OpenJDK 17 is more or less the same.

Long story short, assume you don’t know which java you already have on your laptop, following steps might be help you to install OpenJDK 17 on your macOS.

java -version

# Ignore the output if it said "no matches found:"
sudo rm -fr /Users/$(whoami)/Library/Java/JavaVirtualMachines/*

# Ignore the output if it said "no matches found:"
sudo rm -fr /Library/Java/JavaVirtualMachines/*

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

brew uninstall openjdk@11

brew install openjdk@17

sudo ln -sfn /usr/local/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk

java -version

That’s all for today, if you find this post is helpful, please give a like or click on the “Follow” button on my medium blog, this will probably get the article suggested more and get more readers.

Java17
Setup
Software Development
Openjdk17
Brew
Recommended from ReadMedium