Thorsten Glaser, the current maintainer of OpenJDK 8 in Debian, provides a repository which includes OpenJDK 8, built using the Debian OpenJDK 8 package (see also Debian bug #989736).
To install it on Debian 12, download the appropriate repository configuration file:
wget http://www.mirbsd.org/~tg/Debs/sources.txt/wtf-bookworm.sources
sudo mkdir -p /etc/apt/sources.list.d
sudo mv wtf-bookworm.sources /etc/apt/sources.list.d/
sudo apt update
You’ll then see openjdk-8-jdk, openjdk-8-jre, etc. available for installation as usual:
sudo apt install openjdk-8-jdk
Answer from Stephen Kitt on Stack ExchangeThorsten Glaser, the current maintainer of OpenJDK 8 in Debian, provides a repository which includes OpenJDK 8, built using the Debian OpenJDK 8 package (see also Debian bug #989736).
To install it on Debian 12, download the appropriate repository configuration file:
wget http://www.mirbsd.org/~tg/Debs/sources.txt/wtf-bookworm.sources
sudo mkdir -p /etc/apt/sources.list.d
sudo mv wtf-bookworm.sources /etc/apt/sources.list.d/
sudo apt update
You’ll then see openjdk-8-jdk, openjdk-8-jre, etc. available for installation as usual:
sudo apt install openjdk-8-jdk
I am using the distrubution offered by adoptium, called temurin-8-jdk
mkdir -p /etc/apt/keyrings
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
apt update
apt install temurin-8-jdk
Optional to switch from an old repository
update-alternatives --config java # choose new java
update-alternatives --config javac # choose new javac
Videos
Hello all.
I just want to ask why there is no package for jdk 1.8 forDebian 12? I've seen one for Sid the open-jdk-8.
Why is it so?
Can I change my sources.list for sid, install open-jdk-8 and then revert sources back to bookworm?
Thank you for your responses.
Copies of past Debian packages are available at http://snapshot.debian.org/
You can search there for openjdk-8. The last available version is 8u322-b06-1~deb9u1, logged at http://snapshot.debian.org/package/openjdk-8/8u322-b06-1%7Edeb9u1/ You can download the binary packages (.deb) for your architecture and install with sudo dpkg -i *.deb.
Whether it works or not depends on the library versions that it was built against. 8u312-b07-1 (and other older versions) is also available.
Alternatively you can access the Debian tracking page for the package at https://tracker.debian.org/pkg/openjdk-8. openjdk-8 is still listed there as available for unstable (as version 8u312-b07-1). If you click on the links for the binary packages, they will lead you to download links for the deb packages.
snapshot.debian.org is arguably simpler for ad-hoc downloading since it has the deb files in one place (the debian package repository finds them in http://ftp.us.debian.org/debian/pool/main/o/openjdk-8/ or its mirror sites)
snapshot.debian.org also suggests instructions for configuring sources.list. But if the package is not likely to be updated often then it might be simpler to just download the deb files manually.
Since Oracle changed Java licensing, Bellsoft (not affiliated) has done a great job at providing openJDK installers. They just work, and you can choose between:
- JDK / JRE
- Java 8 / 11 / 17 / 19
- With or without JavaFX
- Windows / Debian / Redhat / Alpine / Solaris / macOs installer
You'll surely find the correct installer at https://bell-sw.com/pages/downloads/#/java-8-lts.
You can install multiple Java versions if you wish. If you need to juggle between versions, you might be interested in this answer.
Trying to run a minecraft mod-pack on debian and I need java version 8. I am running PolyMc off of flatpak and it says:
This instance is not compatible with Java version 21.
Please switch to one of the following Java versions for this instance:
Java version 8
Minecraft 1.21 runs without an issue but this mod pack requires minecraft 1.12.2
I had trouble installing with sudo apt-get install openjdk-8-jdk because debian package does not exist. Message I get is:
E: Unable to locate package openjdk-8-jdk
what do I do in this situation?
Edit: java path is set to /app/jdk/21/bin/java and I can change it when I want
EDIT: This was solved awhile ago, with the help of some commenters. You can get openjdk8 from adoptium (Formerly adoptopenjdk)
I'm trying to install openjdk-8-jre, but it doesn't appear to be in the debian 11 repository.