download:
http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=ocomen
sudo mkdir /usr/lib/jvm
sudo tar zxvf jdk-7u40-linux-x64.tar.gz -C /usr/lib/jvm
cd /usr/lib/jvm/
sudo mv jdk1.7.0/ java-7-sun
vim ~/.bash_profile
- export JAVA_HOME=/usr/lib/jvm/java-7-sun
- export JRE_HOME=${JAVA_HOME}/jre
- export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
- export PATH=${JAVA_HOME}/bin:$PATH
source ~/.bash_profile