rpm -qa|grep jdk
rm -rf /var/run/yum.pid
yum -y remove java-1.7.0-openjdk-1.7.0.99-2.6.5.1.el6.x86_64
vim /etc/profile
JAVA_HOME="/usr/local/software/jdk1.7"
JRE_HOME="/usr/local/software/jdk1.7/jre"
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export JAVA_HOME
export JRE_HOME
export CLASSPATH
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
export JRE_HOME
export CLASSPATH
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
source /etc/profile