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

🌐
Debian
packages.debian.org › sid › openjdk-8-jdk
Debian -- Details of package openjdk-8-jdk in sid
dep: openjdk-8-jre (= 8u412-ga-1) [ia64] dep: openjdk-8-jre (= 8u472-ga-1) [alpha, loong64] dep: openjdk-8-jre (= 8u482-ga-1) [not alpha, ia64, loong64, m68k] dep: zlib1g (>= 1:1.1.4) compression library - runtime · rec: libxt-dev · X11 toolkit intrinsics library (development headers) sug: openjdk-8-demo ·
Discussions

How can I install Java 8 on Debian 12 (bookworm)? - Unix & Linux Stack Exchange
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). More on unix.stackexchange.com
🌐 unix.stackexchange.com
June 26, 2023
Can you install openjdk 8 in debian 11?
Can you install openjdk 8 in debian 11? Yes, but not in a Debian supported way. More on reddit.com
🌐 r/debian
31
14
January 8, 2022
apt - How can I install Java 8 on Debian 11 (Bullseye)? - Unix & Linux Stack Exchange
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. More on unix.stackexchange.com
🌐 unix.stackexchange.com
Where is java 8? (Debian 12)
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. More on reddit.com
🌐 r/debian
79
19
November 15, 2023
🌐
Debian
packages.debian.org › openjdk-8-jdk
I Challenge Thee
I Challenge Thee · AI scrapers break the web, to use this page you'll need JavaScript enabled
🌐
Debian
packages.debian.org › sid › amd64 › openjdk-8-jdk › download
Debian -- Package Download Selection -- openjdk-8-jdk_8u482-ga-1_amd64.deb
You can download the requested file from the pool/main/o/openjdk-8/ subdirectory at any of these sites:
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.

Find elsewhere
🌐
Debian
packages.debian.org › sid › openjdk-8-jdk-headless
Debian -- Details of package openjdk-8-jdk-headless in sid
openjdk-8-doc · openjdk-8-source ... openjdk-19-jdk-headless · openjdk-20-jdk-headless · OpenJDK is a development environment for building applications, applets, and components using the Java programming language....
🌐
Debian
tracker.debian.org › pkg › openjdk-8
openjdk-8 - Debian Package Tracker
[2023-07-02] Accepted openjdk-8 8u382~b04-2~binfix1 (source amd64 arm64 armel armhf i386 ppc64el s390x) into unstable (Thorsten Glaser) [2023-06-30] Accepted openjdk-8 8u382~b04-1 (source) into unstable (Thorsten Glaser)
🌐
GitHub
github.com › Debian › openjdk-8
GitHub - Debian/openjdk-8: OpenJDK 8 packaging for Debian (mirrored from git.debian.org) · GitHub
OpenJDK 8 packaging for Debian (mirrored from git.debian.org) - Debian/openjdk-8
Starred by 7 users
Forked by 5 users
🌐
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?
🌐
Its Linux FOSS
itslinuxfoss.com › home › debian › how to install openjdk-8 on debian 12?
How to Install OpenJDK-8 on Debian 12? – Its Linux FOSS
July 10, 2023 - OpenJDK-8 is the abbreviation of the “Open Java Development Kit” standard edition of the Java platform. It can be installed on the latest release of Debian known as Debian Bookworm.
🌐
GitHub
github.com › Debian › openjdk-8 › blob › master › debian › control
openjdk-8/debian/control at master · Debian/openjdk-8
OpenJDK 8 packaging for Debian (mirrored from git.debian.org) - Debian/openjdk-8
Author   Debian
🌐
Debian
packages.debian.org › stretch › openjdk-8-jdk
Client Challenge
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Debian
ftp.debian.org › debian › pool › main › o › openjdk-8
Index of /debian/pool/main/o/openjdk-8
Index of /debian/pool/main/o/openjdk-8 · Apache Server at ftp.debian.org Port 80
🌐
Debian
packages.debian.org › search
Debian -- Package Search Results -- openjdk-8
sid (unstable) (java): Java runtime based on OpenJDK (demos and examples) 8u472-ga-1: alpha amd64 arm64 armhf i386 loong64 ppc64 ppc64el s390x sh4 sparc64 x32 8u412-ga-1 [debports]: ia64 8u382~b04-2+really8u171-b11-2+b2 [debports]: m68k
🌐
GeoFIS
geofis.org › accueil › install › install on linux › install openjdk 8 on debian jessie
Install OpenJDK 8 on Debian Jessie - GeoFIS
September 26, 2018 - The version 8 of OpenJDK is not available in main stable repository of Debian Jessie. So you have to rely on Debian Backports repository and add the following lines to the end of your /etc/apt/sources.list file: # jessie backports deb http://http.debian.net/debian jessie-backports main Install ...