Clean Oracle JDK install debian / ubuntu

ARM example

sudo su
cd /home/pi
wget http://download.java.net/jdk8/archive/b98/binaries/jdk-8-ea-b98-linux-arm-vfp-hflt-10_jul_2013.tar.gz?q=download/jdk8/archive/b98/binaries/jdk-8-ea-b98-linux-arm-vfp-hflt-10_jul_2013.tar.gz -O java.tar.gz
mkdir -p /opt
tar zxvf java.tar.gz -C /opt
rm java.tar.gz
update-alternatives –install “/usr/bin/java” “java” “/opt/jdk1.8.0/bin/java” 1
update-alternatives –set java /opt/jdk1.8.0/bin/java
java -version

Oracle download :

wget –no-check-certificate –no-cookies –header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.tar.gz