This answer explains why it was removed. I'm not interested in the reason, instead, I need to install it. This VM is solely dedicated to my Java app, so I'm not really interested in using a container. That answer mentions that you can get it from the Stretch repos, but I don't want to create a Franken-Debian, so I'm not sure if that's a good idea or not. I need to install the Java 8 JRE, from OpenJDK. I installed Debian 11, and used an advanced installation due to a hypervisor bug*.
Here's what I did to install it:
$ sudo apt update
...
$ sudo apt install openjdk-8-jre
Reading package lists... Done
Building dependency tree... Done
Building state information... Done
Package openjdk-8-jre is not available, but is referenced to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another sources
However the following packages replace it:
nvidia-openjdk-8-jre
E: Package 'openjdk-8-jre' has no installation candidate
If it helps, here is my /etc/apt/sources.list
file:
... commented lines ommitted ...
deb http://deb.debian.org/debian/ bullseye main non-free contrib
deb-src http://deb.debian.org/debian/ bullseye main non-free contrib
deb http://security.debian.org/debian/security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian/bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian/bullseye-updates main contrib non-free
So, I tried searching for it... and it isn't there (I'm using Bullseye/11 - the current stable release). Interestingly, it is there in Debian Stretch. Except... I want to use Bullseye, as it is stable, not Stretch. So how should I install the OpenJDK 8 JRE in Bullseye?
Should I just add the Stretch repos to my sources.list
? They advise against doing that, so what is the proper way to get Java 8?
*My hypervisor requires that grub-install
has the --removable
flag when using UEFI. IDK why it requires that, but I had to use the advanced install to enable the removable flag. That should be irrelevant, though.