linux environment variable to add java

1, the first installation package shared files are copied to directory / usr / local / src, to give installation path /usr/local/src/jdk1.7.0_67
2, then vim ~ / .bashrc, enter the following
export JAVA_HOME = / usr / local / the src / jdk1.7.0_67
Export ClASSPATH =:. $ the CLASSPATH: $ the JAVA_HOME / lib
Export the PATH the PATH = $: $ the JAVA_HOME / bin

3、source ~/.bashrc

4, input which java view java path
/usr/local/src/jdk1.7.0_67/bin/java

Guess you like

Origin www.cnblogs.com/aqiliangxue/p/12222729.html