Oracle Java 8 required by some programs and it is not available on Debian archive due to licensing issues.
To install Java 8 on Debian Jessie with minimum effort, you can use WebUpd8's Java PPA repositories. Follow the steps below:
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | \
sudo tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | \
sudo tee -a /etc/apt/sources.list.d/webupd8team-java.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
sudo apt-get update
sudo apt-get install oracle-java8-installer
After installation, you can check the java version:
$ javac -version
If you can see the version number 1.8.XX, Java 8 installation completed.
If there are other Java/JDK packages on your system, you need to select the default one. Selection can be made with
update-alternatives command but WebUpd8 repositories also includes a small package which makes setting Java 8 as default more easily. You just need to install the
sudo apt-get install oracle-java8-set-default