맥에서 자바 설치 Brew - java install with brew on macOS
by 개발자   2024-06-03 16:29:22   조회수:379
1. home-brew install & update
~ %  brew update

2. add adoptopenjdk/openjdk 

~%  brew tap adoptopenjdk/openjdk

3.  search idk list

~% brew search jdk

4.  java home location

~% /usr/libexec/java_home -V

5. java version check

~% java --version

6. your shell check

~% echo $SHELL  

7. edit shell profile

~% vi ~/.zshrc

8. java path switch 

export java_home_11= xxxx

export java_home_17=xxx

#export java_home=$java_home11

export java_home=$java_home_17

9.  Apply profile

~% source ~/.zshrc