ubuntu设置jdk

vim /etc/environment
export JAVA_HOME=/usr/lib/jdk/jdk1.8.0_333
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib 


vim /etc/profile

export JAVA_HOME=/usr/lib/jdk/jdk1.8.0_333
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

 

posted @ 2024-01-14 18:01  天涯已可  阅读(8)  评论(0编辑  收藏  举报