Install Java8 on Debian 8 & 9

Install Java8 on Debian 8/9

Add repositories:

echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list

Add Key:

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886

Update:

apt update

Install:
apt-get install oracle-java8-installer

Finish