Mac环境安装
- 下载对应版本jdk:java下载
- 查看安装目录:
/usr/libexec/java_home -V
- 设置环境变量
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk16.0.2.jdk/Contents/Home
PATH=$JAVA_HOME/bin:$PATH:.
CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export JAVA_HOME
export PATH
export CLASSPATH