debian 8 和centos 配置java 环境变量的正确姿态

export JAVA_HOME=/usr/java/jre1.8.0_111
export JAVA_BIN=/usr/java/jre1.8.0_111/bin
export PATH=$PATH:$JAVA_BIN
export CLASSPATH=:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH

红色字体可以进入粗体目录视具体情况而定

export JAVA_HOME=/usr/java/jre1.8.0_111
export JAVA_BIN=/usr/java/jre1.8.0_111/bin
export PATH=$PATH:$JAVA_BIN
export CLASSPATH=:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-i386/jre
export JAVA_BIN=/usr/lib/jvm/java-1.7.0-openjdk-i386/jre/bin
export PATH=$PATH:$JAVA_BIN
export CLASSPATH=:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH

别忘了source /etc/profile

上一篇:QT学习 之 QwtPlot(数学绘图)


下一篇:HDURevenge of Segment Tree(第二长的递增子序列)