Cannot install openjdk-8-jre-headless on Debian Jessie 1
This worked for me:
apt install -t jessie-backports openjdk-8-jre-headless ca-certificates-java
First you need to add
echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
sudo apt-get update sudo apt-get install -t jessie-backports openjdk-8-jre-headless
switch to new java
sudo /usr/sbin/update-java-alternatives -s java-1.8.0-openjdk-amd64
I had this problem on Debian Buster, which also doesn't have this package. Since none of the answers on this page worked for me, and the accepted answer led me to another SE answer which I also could not get to work, I just wanted to post what did work for me on Buster.
Following the instructions on the debian website, I added the following line to
deb http://security.debian.org/debian-security stretch/updates main
I was then able to
sudo apt update and
sudo apt install openjdk-8-jre-headless.