Install OpenJDK Java (8/11/17) versions using brew on Mac (Intel/M1/M2)


To install OpenJDK on Mac running on Intel or M1/M2 ARM Apple Silicon chip, you can make use of the brew install openjdk command, but if you use it without any version the lasted Java JDK will get installed which is JDK 18 as of September 2022.

Installing Specific Version of OpenJDK using Brew

Installing Java JDK 8

% brew install openjdk@8


Installing Java JDK 11

% brew install openjdk@11


Installing Java JDK 17

% brew install openjdk@17

Install OpenJDK using brew command
Read more: https://formulae.brew.sh/formula/openjdk

Have Questions? Post them here!
Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.