Linux JDK环境变量配置

$ sudo vi /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
.....

# java
export JAVA_HOME=/usr/java/jdk1.8.0_311
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

posted on 2021-11-25 08:39  严中辉  阅读(31)  评论(0编辑  收藏  举报