1.JDK下载
image.pngjava 8 下载: https://www.oracle.com/java/technologies/javase-jdk8-downloads.html
2.安装
4.配置Java环境变量
jdk 安装目录
/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk
$ vim ~/.bash_profile
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
$ source ~/.bash_profile
5.版本
$ java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
网友评论