Alternatively, you can use adoptopenjdk repository:

wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -

sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/

sudo apt-get update && sudo apt-get install adoptopenjdk-8-hotspot

https://adoptopenjdk.net/installation.html

Answer from Nizarazu on Stack Overflow
Top answer
1 of 12
158

Alternatively, you can use adoptopenjdk repository:

wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -

sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/

sudo apt-get update && sudo apt-get install adoptopenjdk-8-hotspot

https://adoptopenjdk.net/installation.html

2 of 12
80

WARNING: this answer suggest unsupported and dangerous mixing of Debian releases. Follow the advice on your own risk, as it can break the system on upgrades, as explained in http://wiki.debian.org/DontBreakDebian#Don.27t_make_a_FrankenDebian

Package mirror search steps:

  1. In the Search package directories search for openjdk-8-jdk. You can see two results:

    • stretch (oldstable) (java): OpenJDK Development Kit (JDK)
    • sid (unstable) (java): OpenJDK Development Kit (JDK)
  2. Choose stretch repository

  3. Scroll to the Download openjdk-8-jdk section and choose your architecture. For example amd64

  4. Now you can see mirrors list and instructions how to install the package via apt:

    You should be able to use any of the listed mirrors by adding a line to your /etc/apt/sources.list like this:

    deb http://security.debian.org/debian-security stretch/updates main

Installation steps:

  1. Install software source manager

    apt-get update
    apt-get install software-properties-common
    
  2. Add mirror with openjdk-8-jdk

    apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main'
    apt-get update
    
  3. Install openjdk 8

    apt-get install openjdk-8-jdk
    

Note: You can use steps above to find an official Debian mirror with any other package you want to install

🌐
TecAdmin
tecadmin.net › install-java-8-on-debian
How To Install Java 8 on Debian 10/9/8 via PPA - TecAdmin
April 26, 2025 - If you have debian 8/9/10. On Debian 8 and 9 you can run “apt install openjdk-8-jdk” and for Debian 10 (Buster), if you want the java 8 version add this in the sources.list file in /etc/apt:
Discussions

Installing openjdk/jre-8 on Debian 10
There's AdoptOpenJDK More on reddit.com
🌐 r/debian
24
6
August 18, 2020
apt - How can I install Java 8 on Debian 11 (Bullseye)? - Unix & Linux Stack Exchange
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 contain... More on unix.stackexchange.com
🌐 unix.stackexchange.com
How do I now install Oracle JDK 8 on Debian 10? Now the Webupd8 repos Discontinued? Or even openjdk-8?
AdoptOpenJDK is probably the easiest method. More on reddit.com
🌐 r/debian
26
6
August 16, 2019
No Java 8 on Debian 10 (Buster)?

default-jre is based on OpenJDK, not Java SE.

More on reddit.com
🌐 r/debian
14
1
August 14, 2020
🌐
SanjuroE's blog
sanjuroe.dev › java-8-on-debian-10-11
Java 8 on Debian 10+ - SanjuroE's blog
TL;DR: Execute highlighted commands to install Java 8 on Debian 10+. Debian 10 and higher (e.g. Buster or Bullseye) no longer provide Java 8. However certain software, including Sonatype Nexus, still is not compatible with versions higher than 8. In this past it was easy to install AdoptOpenJDK.
🌐
LinuxBuz
linuxbuz.com › linuxhowto › install-java-debian-10
How to Install Java on Debian 10 - LinuxBuz
August 26, 2024 - If you want to install only Java Runtime Environment (JRE), run the following command: ... By default, Java 8 is not included in the Debian 10 default repository.
🌐
GitHub
gist.github.com › rexlManu › c48375b310d04626b8ddefa71fb56493
Install java 8 on debian 10 · GitHub
Yea only if u already had a java version installed, then you would need to change it with your command 👍 ... Its only in Ubuntu Repositories Inside. For debian you need to add it
🌐
Reddit
reddit.com › r/debian › installing openjdk/jre-8 on debian 10
r/debian on Reddit: Installing openjdk/jre-8 on Debian 10
August 18, 2020 -

I manage a small linux server for a bunch of mediocre Minecraft servers and I'm trying to add a DW20 FTB server (which is on a very dated version of Minecraft and requires java 8) and haven't been able to get past this issue.

I was able to earlier this year, but since it has depreciated the public repo is no longer available.

I tried this repo, but doesn't work due to security reasons that I can't wrap my head around.

I'm back on 11 for the meantime, but I'm pulling hairs out trying to figure this out and really would prefer to stick with Debian vs Windows.

I know these are all probably stupid questions, but even though I've been hosting Linux servers for a few years there's still a lot of roadblocks I find myself running into.

Thanks in advane and sorry for another Minecraft question haha.

Edit: https://www.reddit.com/r/debian/comments/ic00jf/installing_openjdkjre8_on_debian_10/g1zdcnh/

This is the solution that worked for me. Thanks everyone else that helped, too!

Find elsewhere
Top answer
1 of 3
6

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.

2 of 3
5

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.

🌐
GitHub
gist.github.com › wagyourtail › b115f66d135b3818b63d9b27048d80e6
Installing Java 8 on various Linux distros · GitHub
Save wagyourtail/b115f66d135b3818b63d9b27048d80e6 to your computer and use it in GitHub Desktop. ... This guide will show you how to install both the openjdk and oracle java distros on linux via the command line, the steps are practically identical for the JDK, but have a different download links / package names.
🌐
Reddit
reddit.com › r/debian › how do i now install oracle jdk 8 on debian 10? now the webupd8 repos discontinued? or even openjdk-8?
r/debian on Reddit: How do I now install Oracle JDK 8 on Debian 10? Now the Webupd8 repos Discontinued? Or even openjdk-8?
August 16, 2019 -

Im setting up a new dedi for running my Minecraft server, I use a Minecraft server called paper, based off Spigot, and a lot of the plugins are built using Java 8. Stats are recorded, and 95% of servers use Java 8: https://i.imgur.com/wHOiVQi.png So I don't want to be the one that uses Java 11 and has to figure out issues. https://bstats.org/global/bukkit

What i'm struggling to figure out, is how do I install the Oracle JDK from the tar? Or alternatively how do I install openjdk-8 on Debian 10? When I search for it I cant see it appear in the repo's, there is a nvidia-openjdk-8-jre that appears.

This is how I did it previously: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

I got recommended https://adoptopenjdk.net on reddit earlier, is this the way to do it now? I'm so overwhelmed with what the right way is.

🌐
HowtoForge
howtoforge.com › home › how to install java (jdk and jre) on debian 10
How to Install Java (JDK and JRE) on Debian 10
In this tutorial, we will show you how to install Java on the Debian 10 (Buster). We will install both the JDK (Java Development Kit) and the JRE (Java Runtime Environment on a Debian server.
🌐
Wordpress
mrzhubin.wordpress.com › 2021 › 01 › 23 › install-java-8-on-debian-10
Install Java 8 on Debian 10 - 真空生活记录 - WordPress.com
January 24, 2021 - wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add - sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ sudo apt-get update && sudo apt-get install adoptopenjdk-8-hotspot ...
🌐
TecAdmin
tecadmin.net › how-to-install-java-on-debian-10-buster
How To Install Java on Debian 10 (Buster) – TecAdmin
April 26, 2025 - How to Install Java on Debian 10 Buster. This tutorial will help to install JAVA (OpenJDK) on Debian 10 Buster using Apt-get.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-java-with-apt-get-on-debian-8
How To Install Java with Apt-Get on Debian 8 | DigitalOcean
June 28, 2017 - To ensure that we get the correct source line on Debian, we’ll need to run the following command that also modifies the line: sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" ... Now we’ll go through the installation process of different versions ...
🌐
ITzGeek
itzgeek.com › home › how to's › linux › debian › how to install oracle java jdk 12 / 11 / 8 on debian 10 / debian 9
How To Install Oracle Java JDK 12 / 11 / 8 on Debian 10 / Debian 9
July 24, 2019 - ### Oracle JDK 12 ### sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-12.0.2/bin/java 1 ### Oracle JDK 11 ### sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-11.0.4/bin/java 2 ### Oracle JDK 8 ### sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_221/bin/java 3 · Set the default java using the below command. ... If the system has multiple versions of JAVA, then the above command may list it all, like below. Change the default Java version by typing number under Selection column and then press enter. Install Oracle JDK on Debian 10 – Set Default Java Version
🌐
Reddit
reddit.com › r/debian › where is java 8? (debian 12)
r/debian on Reddit: Where is java 8? (Debian 12)
November 15, 2023 -

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.

Top answer
1 of 15
16
I just want to ask why there is no package for jdk 1.8 forDebian 12? Debian only maintains a single JDK per release, because of the work it entails. (Also, it probably doesn't help that OpenJDK 8 was originally supposed to be EOL by now .) Can I change my sources.list for sid, install open-jdk-8 and then revert sources back to bookworm? I would avoid doing this. If you don't run in to any problems with mixing releases, that still leaves you with no way of getting security updates for Java. If you definitely need an alternative version of Java, third-party repositories are probably your best bet. I don't personally know what people currently prefer to use, but the Zula builds of OpenJDK are offered by extrepo , so that would be an easy thing to try first.
2 of 15
9
why there is no package for jdk 1.8 for Debian 12? Because openjdk-8 was superseded by openjdk-11, which in turn was superseded by openjdk-14, which in turn was superseded by openjdk-17, which is the default java version in Debian 12. Can I change my sources.list for sid, install open-jdk-8 and then revert sources back to bookworm? You probably can do that, but then you will get a lot of other packages from sid, and your system will become a "frankendebian". Not recommended. In general, installing packages from testing or unstable on a system running stable is not a good idea. Whenever I needed an old java version I usually take it from a previous release (not from testing or unstable). That usually works. But openjdk-8 is too old and it's not even in Debian 11. The real question here would be: Why are you still using java 8?
🌐
Vegastack
vegastack.com › tutorials › how-to-install-java-on-debian-10-linux
Learn How to Install Java on Debian 10 Linux
November 15, 2023 - The JDK package includes JRE. Install the default-jre package if you only require JRE. The official Debian Buster repositories do not currently have the prior Java LTS version 8 available.
🌐
Linuxize
linuxize.com › home › java › how to install java on debian 10 linux
How to Install Java on Debian 10 Linux | Linuxize
February 24, 2020 - In this tutorial, we will explain how to install Java (OpenJDK) on Debian 10 Linux.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-java-with-apt-on-debian-10
How To Install Java with Apt on Debian 10 | DigitalOcean
July 26, 2019 - The easiest option for installing Java is to use the version packaged with Debian. By default, Debian 10 includes OpenJDK version 11, which is an open-source variant of the JRE and JDK, and is compatible with Java 11.