Faced a problem while downloading JDK from the shell?
Yes, Oracle checks for cookies and here’s a small trick to install latest JDK right from oracle’s website:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" -O jdk-linux-x64.rpm "http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.rpm"
rpm -Uvh jdk-linux-x64.rpm