Install Java 8 in debian Jessie

At the end i solved it adding jessie backports to the sources.list:

echo deb http://http.debian.net/debian jessie-backports main >> /etc/apt/sources.list

apt-get update && apt-get install openjdk-8-jdk

update-alternatives --config java

Same as @user2528085, you just need to add Debian backports to your sourcelist file.

Follow this instruction on Debian official site https://backports.debian.org/Instructions/

Run these commands in shell:

echo "deb http://ftp.debian.org/debian jessie-backports main" | sudo tee -a /etc/apt/sources.list.d/jessie-backports.list

sudo apt-get update && sudo apt-get install elasticsearch

Nothing difficult


I ran the following commands from the webupd8 team and it worked for me: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

su -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit