1. download java-{your-version}.tar.gz from oracle.com
2. run
sudo tar xvf jdk-{your-version}.tar.gz --directory /usr/lib/jvm/
3. check verson
/usr/lib/jvm/jdk{your-version}/bin/java -version
/usr/lib/jvm/jdk{your-version}/bin/javac -version
4. if versions are working for you,
sudo vim /etc/profile
5. add following to the file. Log out and log in again
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_80
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH