📅  最后修改于: 2022-03-11 14:50:06.158000             🧑  作者: Mango
sudo gedit /etc/profile
#add following lines
JAVA_HOME=/usr/lib/jvm/{your jdk path}
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH
#logout to update the changes