apt can’t locate openjdk-16-jre-headless because the OpenJDK 16 packages aren’t available in any Debian release.

The only release available to you in Debian 10 is OpenJDK 11. Debian 11 has OpenJDK 17. Both of these are releases with long-term support.

Answer from Stephen Kitt on Stack Exchange
🌐
Reddit
reddit.com › r/debian › need help: installing openjdk-11 on debian 12
r/debian on Reddit: Need Help: Installing OpenJDK-11 on Debian 12
June 21, 2023 -

I recently upgraded my Debian version to the shiny new Debian 12, and I'm currently facing a small hiccup while trying to install OpenJDK-11. I'm aware that the apt install default-jdk command usually does the trick, but in this case, it installs version 17 of OpenJDK. Unfortunately, I specifically need JDK 11 for my project.

I successfully used apt install default-jdk in Debian 11 without any issues, so I'm wondering if there have been any changes in Debian 12 that require a different approach for installing OpenJDK-11. I'd greatly appreciate it if anyone could kindly guide me through the correct steps to install OpenJDK-11 on Debian 12.

Thank you in advance for your time and assistance!

🌐
Stack Overflow
stackoverflow.com › questions › 57960603 › e-unable-to-locate-package-openjdk-11-jdk
maven - E: Unable to locate package openjdk-11-jdk - Stack Overflow
FROM maven:3-jdk-11 # Common files and utils for build RUN apt-get update && apt-get install -y make fakeroot rpm dpkg-dev apt-utils wget unzip RUN apt-get install -y -q software-properties-common desktop-file-utils # Then Wine with all deps RUN dpkg --add-architecture i386 && apt-get update RUN apt-get install -y --install-recommends wine RUN apt-cache search openjdk RUN apt-get install -y openjdk-11-jdk RUN apt install -y openjfx11 libopenjfx-java libopenjfx-jni RUN apt-get install -y --install-recommends wine32 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64 ENV JAVAFX_HOME /usr/share/java/openjfx11 # And we ready to play with our code ARG SRCDIR=. ARG DSTDIR=/usr/src/CryptoStock ARG CACHEDIR=./cache # Subject to be used here but should be command line, sic!
🌐
Ralph's Open Source Blog
ralph.blog.imixs.com › 2024 › 01 › 24 › install-open-jdk-11-on-debian-12-bookworm
Install Open JDK 11 on Debian 12 (Bookworm) - Ralph's Open Source Blog
January 24, 2024 - In Debian 12 the default JDK is Java 17. In case you need Java 11 instead you can follow this blog from Linux Shout . Here is the short version: 1) Edit your sources.list Edit the file /etc/apt/sources.list and add the unstable packages at the end of the file deb…
🌐
Reddit
reddit.com › r/linux4noobs › cant install java on debian
r/linux4noobs on Reddit: Cant install java on debian
October 14, 2024 -

If i try to install using sudo apt-get install openjdk i get unable to locate package openjdk and if i try to add a repo i get the error in the photo so i cant install java using this repo i found in a tutorial

🌐
Debian
packages.debian.org › bullseye › openjdk-11-jdk
Debian -- Details of package openjdk-11-jdk in bullseye
OpenJDK is a development environment for building applications, applets, and components using the Java programming language · This page is also available in the following languages (How to set the default document language):
🌐
LinuxShout
linux.how2shout.com › home › 2 ways to install openjdk 11 on debian 12 server or desktop
2 ways to install OpenJDK 11 on Debian 12 Server or Desktop - LinuxShout
July 10, 2024 - Well, OpenJDK 11 is unavailable through the default system repositories of Debian 12; instead, version 17 is there. However, we can install OpenJDK 11 by adding the Debian SID repository, which is meant to install the latest packages for testing.
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 77837624 › e-unable-to-locate-package-openjdk-11-jdk-on-dockerfile
python - E: Unable to locate package openjdk-11-jdk on dockerfile - Stack Overflow
Now you have to change the FROM instruction since the default image for python:3.7 is bookworm and openjdk-11-jdk is available on bullseye:
🌐
Debian
packages.debian.org › sid › openjdk-11-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
🌐
GitHub
github.com › microsoft › openjdk › issues › 584
Debian 12: E: unable to locate package msopenjdk-21 · Issue #584 · microsoft/openjdk
December 15, 2023 - It's okay on Debian 10. I've checked the online packages directory, no any msopenjdk in Debian 12 packages directory, is it related? Debian 12 Debian 10
Author   microsoft
🌐
Reddit
reddit.com › r/debian › why can’t i install openjdk 21 on debian:bookworm?
r/debian on Reddit: Why can’t I install OpenJDK 21 on debian:bookworm?
May 26, 2025 -

Hi everyone,

I’ve been using Debian-based images for most of my Docker containers without issues, but I recently ran into a strange problem. I’m trying to install openjdk-21-jre on debian:bookworm-slim, but I keep getting an “unable to locate package” error.

After some digging, I realized that the default Bookworm repositories only go up to JDK 17, even though Bookworm is the latest stable Debian release. However, when I switched to debian:sid (unstable), I was suddenly able to install OpenJDK 21 via apt with no problem.

I know that Sid is considered unstable, so I’m hesitant to use it in production. Can someone explain why this works this way? And more importantly, what’s the best approach to use OpenJDK 21 in production with Docker? Should I rely on debian:sid, or is there a cleaner or safer way to get JDK 21 while staying on debian:bookworm-slim?

Thanks in advance!

🌐
GitHub
github.com › koenvervloesem › bazel-on-arm › issues › 2
Debian 9 support · Issue #2 · koenvervloesem/bazel-on-arm
September 12, 2020 - $ echo "deb http://ftp.de.debian.org/debian stretch-backports main" | tee /etc/apt/sources.list $ apt-get update $ apt-get -t stretch-backports install -y openjdk-11-jdk-headless $ apt-get install -y build-essential zip unzip libatomic1 $ update-java-alternatives -s java-1.11.0-openjdk-arm64
Author   koenvervloesem
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-java-with-apt-on-debian-11
How To Install Java with Apt on Debian 11 | DigitalOcean
September 1, 2022 - Oracle JDK comes with the JRE included, so you don’t need to install that separately. The version of Oracle’s JDK you need to download must match the version of the installer script. To find what version you need, visit the oracle-java11-installer page. The location of your package is in ...
🌐
Reddit
reddit.com › r/linux4noobs › heed help installing openjdk-11 on debian 12
r/linux4noobs on Reddit: Heed help Installing OpenJDK-11 on Debian 12
June 21, 2023 -

I recently upgraded my Debian version to the shiny new Debian 12, and I'm currently facing a small hiccup while trying to install OpenJDK-11. I'm aware that the apt install default-jdk command usually does the trick, but in this case, it installs version 17 of OpenJDK. Unfortunately, I specifically need JDK 11 for my project.

I successfully used apt install default-jdk in Debian 11 without any issues, so I'm wondering if there have been any changes in Debian 12 that require a different approach for installing OpenJDK-11. I'd greatly appreciate it if anyone could kindly guide me through the correct steps to install OpenJDK-11 on Debian 12.

Thank you in advance for your time and assistance!

🌐
GitHub
github.com › apache › airflow › discussions › 31938
Package 'openjdk-11-jre' has no installation candidate · apache/airflow · Discussion #31938
@potiuk Thanks for pointing out! there was another docker file in the repo that contained the openjdk-11,,, i will update it to download version 17 instead! ... Beta Was this translation helpful? Give feedback. ... There was an error while loading. Please reload this page. Something went wrong. There was an error while loading. Please reload this page. ... Ah I know. You are using bookworm, released last week in the other image (maybe accidentally) https://www.debian.org/releases/bookworm/. Airflow still uses Bullseye LTS.
Author   apache