$ /usr/libexec/java_home -V
$ brew install --cask adoptopenjdk8
java1.8 버전이 설치되어 있지 않아서 바로 설치!
$ /usr/libexec/java_home -V
.
.
.
1.8.0_292 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
# 1.8 경로 확인
$ /usr/libexec/java_home -v 1.8
$ sudo vi ~/.bash_profile
[변경 전]
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
export PATH=${PATH}:$JAVA_HOME/bin
[변경 후]
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
export PATH=${PATH}:$JAVA_HOME/bin
$ source ~/.bash_profile