jdk linux configuration environment variable

export JAVA_HOME=/lya/software/jdk1.8

export JRE_HOME=${JAVA_HOME}/jre 
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=$PATH:${JAVA_HOME}/bin

1. vim   /etc/profile

 

2. Copy the code above to the end of the file

 

3.   

source /etc/profile

 

Guess you like

Origin www.cnblogs.com/whm-blog/p/11225869.html