반응형
맥(MacOS) M1 Apple Silicon 환경 - JDK 버전 변경하기
<< 환경설정 >>
MacBook Pro M1
사용자 홈 디렉토리 환경설정
환경설정 파일 편집
vi ~/.zshrc
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#### jdk ##########################################################################################################################
alias oraclejdk1.6='unset JAVA_HOME;export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home;java -version'
alias oraclejdk1.7='unset JAVA_HOME;export JAVA_HOME=$(/usr/libexec/java_home -v 1.7);java -version'
alias openjdk1.8='unset JAVA_HOME;export JAVA_HOME=$(/usr/libexec/java_home -v 1.8);java -version'
alias oraclejdk9='unset JAVA_HOME;export JAVA_HOME=$(/usr/libexec/java_home -v 9);java -version'
alias openjdk9='unset JAVA_HOME;export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-9.jdk/Contents/Home;java -version'
alias openjdk10='unset JAVA_HOME;export JAVA_HOME=$(/usr/libexec/java_home -v 10);java -version'
alias openjdk11='unset JAVA_HOME;export JAVA_HOME=$(/usr/libexec/java_home -v 11);java -version'
alias openjdk12='unset JAVA_HOME;export JAVA_HOME=$(/usr/libexec/java_home -v 12);java -version'
alias openjdk13='unset JAVA_HOME;export JAVA_HOME=$(/usr/libexec/java_home -v 13);java -version'
unset JAVA_HOME
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
##################################################################################################################################
|
환경설정 적용
source ~/.zshrc
|
또는
exec zsh
|
반응형
'맥 (Mac) > 개발환경 (MacOS M1)' 카테고리의 다른 글
[MacOS 개발환경 #12] Apache JMeter (5.4.1) 설치 (0) | 2021.06.27 |
---|---|
[MacOS 개발환경 #11] 자바 디컴파일러 (Java Decompiler) 설치 및 실행 (0) | 2021.06.27 |
[MacOS 개발환경 #4] Open JDK 1.8 설치 / 환경설정 (0) | 2021.06.27 |
[MacOS 개발환경 #3] Oracle JDK 1.7 설치 / 환경설정 (0) | 2021.06.27 |
[MacOS 개발환경 #2] Oracle JDK 1.6 설치 / 환경설정 - Homebrew (0) | 2021.06.27 |