真接rpm包安装javaxxxx.rpm 然后调整/etc/profile
如下:
# tail -n 4 /etc/profile JAVA_HOME=/usr/java/jdk1.8.0_45 PATH=$PATH:$JAVA_HOME/bin CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH JAE_HOME CLASSPATH
重新加载环境变量:
# source /etc/profile
真接rpm包安装javaxxxx.rpm 然后调整/etc/profile
如下:
# tail -n 4 /etc/profile JAVA_HOME=/usr/java/jdk1.8.0_45 PATH=$PATH:$JAVA_HOME/bin CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH JAE_HOME CLASSPATH
重新加载环境变量:
# source /etc/profile