linux
openjdk download_url : https://www.openlogic.com/openjdk-downloads
源码包安装
java 11
tar -zxvf jdk-11.0.14_linux-x64_bin.tar.gz -C /usr/local/
cat >> /etc/profile <<"EOF"
export JAVA_HOME=/usr/local/jdk-11.0.14
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=.:${JAVA_HOME}/bin:$PATH
EOF
source /etc/profile
java -version
java 8
tar -zxvf jdk-8u202-linux-x64.tar.gz -C /usr/local/
vim /etc/profile
export JAVA_HOME=/usr/local/jdk1.8.0_212
export CLASSPATH=.:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=.:${JAVA_HOME}/bin:$PATH
source /etc/profile
java -version
windows
JAVA_HOME
D:\Program Files\Java\jdk1.8.0_202
CLASSPATH
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin