Member-only story

Brew Install Java on Mac

--

A straightforward approach to setting up Java along with your java compiler

Install

In a terminal window

$ brew install java

Connect the dots

$ brew info openjdk

The following steps should print out:

Yours will be slightly different

...If you need to have openjdk first in your PATH, run:   echo ‘export PATH=”/opt/homebrew/opt/openjdk/bin:$PATH”’ >> /Users/matthew/.bash_profileFor compilers to find openjdk you may need to set:   export CPPFLAGS=”-I/opt/homebrew/opt/openjdk/include”...

Close and reopen the terminal window

Test for success!

$ java -version

HAPPY CODING! 🎉

--

--

Matthew Morgan
Matthew Morgan

Written by Matthew Morgan

Software Engineer | Hire Me!!

No responses yet

Write a response