References

Prerequisite

  1. Debian

Preperation

# Check java version if exist
java -version

Install Oracle Java 8

Add the webupd8team Java PPA repository in your Debian system.

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886

Update the package index and install Java 8.

apt-get update
apt-get install oracle-java8-installer

Check if Java has been properly installed:

java -version