Domestic image installation
https://repo.huaweicloud.com/java/jdk/12.0.1+12/
path
cd
vim .zshrc
Add a comment in the path
export JAVA_HOME=/home/txl/Documents/jdk-12.0.1
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
Become effective
source .zshrc
test
java -version