打开文件:
vim ~/.bashrc
末尾添加配置:
export JAVA_HOME=/usr/share/jdk8
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
更新:
source ~/.bashrc (更新路径)
打开文件:
vim ~/.bashrc
末尾添加配置:
export JAVA_HOME=/usr/share/jdk8
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
更新:
source ~/.bashrc (更新路径)