본문 바로가기

기타

[mac] JAVA 11(Zulu JDK11) 다운로드 및 설치

728x90

JAVA 11(Zulu JDK11) 다운로드 및 설치

zulu java 설치

brew tap mdogan/zulu
> brew tap mdogan/zulu
==> Tapping mdogan/zulu
Cloning into '/opt/homebrew/Library/Taps/mdogan/homebrew-zulu'...
remote: Enumerating objects: 530, done.
remote: Counting objects: 100% (105/105), done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 530 (delta 73), reused 75 (delta 52), pack-reused 425
Receiving objects: 100% (530/530), 162.67 KiB | 5.81 MiB/s, done.
Resolving deltas: 100% (302/302), done.
Tapped 13 casks (53 files, 292.6KB).
brew install zulu-jdk11
> brew install zulu-jdk11
==> Downloading https://cdn.azul.com/zulu/bin/zulu11.56.19-ca-jdk11.0.15-macosx_aarch64.dmg
######################################################################## 100.0%
==> Installing Cask zulu-jdk11
==> Running installer for zulu-jdk11; your password may be necessary.
Package installers may write to any location; options such as `--appdir` are ignored.
Password:
installer: Package name is Azul Zulu JDK 11.56+19
installer: Installing at base path /
installer: The install was successful.
🍺  zulu-jdk11 was successfully installed!
728x90

java 버전 확인

java --version
> java --version
openjdk 11.0.15 2022-04-19 LTS
OpenJDK Runtime Environment Zulu11.56+19-CA (build 11.0.15+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.56+19-CA (build 11.0.15+10-LTS, mixed mode)

.zshrc 편집

- JAVA_HOME 환경 변수 등록

vim ~/.zshrc
...
export JAVA_HOME=`/usr/libexec/java_home -v 11`
export PATH=$PATH:$JAVA_HOME/bin
source ~/.zshrc

JAVA_HOME 환경변수 확인

echo $JAVA_HOME
> echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home

 

참고사이트

Azul Zulu : https://docs.azul.com/core/zulu-openjdk/install/macos

 

728x90