Now it is possible to install openjdk-11 this way:

sudo apt-get install openjdk-11-jdk

(Previously it installed openjdk-10, but not anymore)

Answer from user5479362 on Stack Overflow
🌐
LinuxCapable
linuxcapable.com › home › ubuntu › how to install openjdk 11 on ubuntu 26.04, 24.04 and 22.04
How to Install OpenJDK 11 on Ubuntu 26.04, 24.04 and 22.04 - LinuxCapable
April 28, 2026 - The Ubuntu Universe and Multiverse guide explains the repository components in more detail, but OpenJDK 11 only needs Universe. ... Install the full Java 11 JDK on Ubuntu with sudo apt install openjdk-11-jdk -y when you need both the runtime ...
Discussions

Problem installing openjdk-11-jdk
What Debian version? Bookworm ships openjdk-17-jdk. 11 was in buster. As to why you're running a v16 JRE, no idea, you likely have some JRE in the path or installed some weird package from outside the Debian repositories. Running which java should at least give you a hint. More on reddit.com
🌐 r/debian
6
1
September 6, 2023
Unable to install open Java
You have to type exactly the name of exactly the available package. So use a little bit of grep to filter it down apt search jdk | grep open etc,etc,etc More on reddit.com
🌐 r/linux4noobs
9
1
February 9, 2019
openjdk-8 java install
https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa sudo apt-add-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-8-jdk Or if you only need the jre instead of the full jdk: sudo apt-get install openjdk-8-jre More on reddit.com
🌐 r/linuxmint
2
3
March 28, 2015
Need Help: Installing OpenJDK-11 on Debian 12
Looks like 11 was removed from bookworm. https://packages.debian.org/search?keywords=OpenJdk-11&searchon=names&suite=all§ion=all You can install the version from bullseye somewhat manually, though that is generally not recommended, but I prefer doing that over installing from source. You could try grabbing individual debs from the website, or include the bullseye repo and see what happens. I don't know if there are incompatibilities that will force you to use a flatpack or other packaging system to keep things separate. More on reddit.com
🌐 r/debian
26
9
June 21, 2023
🌐
OpenJDK
openjdk.org › install
OpenJDK: Download and install
If you want to develop Java programs then please install the openjdk-8-jdk package. On the command line, type: $ su -c "yum install java-1.8.0-openjdk" The java-1.8.0-openjdk package contains just the Java Runtime Environment. If you want to develop Java programs then install the java-1.8.0-openjdk-devel package. On the command line, type: $ sudo apt-get install openjdk-7-jre ·
🌐
Linode
linode.com › docs › guides › how-to-install-openjdk-on-ubuntu-18-04
Install OpenJDK 11 (Java Development Kit) on Ubuntu 18.04 | Linode Docs
March 25, 2020 - sudo apt-get install openjdk-11-jdk · Alternatively, if you simply want to run Java applications that you have already downloaded, you can choose to only install OpenJRE 11: sudo apt-get install openjdk-11-jre · Note · While you can run Java ...
🌐
Linode
linode.com › docs › guides › how-to-install-openjdk-ubuntu-22-04
Installing OpenJDK on Ubuntu 22.04 | Linode Docs
March 20, 2023 - The following command demonstrates ... instruction. ... To install release 11 of OpenJDK, use the command sudo apt-get install openjdk-11-jdk....
🌐
ComputingForGeeks
computingforgeeks.com › home › install java (openjdk) on debian 13 – jdk and jre
Install Java 11 (OpenJDK 11) on Debian 12 | 11 | 10 | ComputingForGeeks
February 7, 2025 - This means that the following packages can be installed from the OS APT repositories: # Install openJDK JDK 11 sudo apt install openjdk-11-jdk
Find elsewhere
🌐
Ubuntu
ubuntu18.com › ubuntu-install-openjdk-11
How to Install OpenJDK 11 in Ubuntu 18.04
September 5, 2018 - Login to your Ubuntu system, Open the terminal and install the openjdk-11-jdk-headless package: sudo apt-get update sudo apt-get install openjdk-11-jdk-headless
🌐
Linode
linode.com › docs › guides › how-to-install-openjdk-on-ubuntu-20-04
How To Install Java Development Kit 11 on Ubuntu 20.04 | Linode Docs
March 25, 2020 - sudo apt-get install openjdk-11-jdk · Alternatively, if you simply want to run Java applications that you have already downloaded, you can choose to only install OpenJRE 11: sudo apt-get install openjdk-11-jre · Note · While you can run Java ...
🌐
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 - Now you can install JDK 11 and switch the java version using the · $ sudo apt update $ sudo apt install openjdk-11-jdk $ sudo update-alternatives --config java
🌐
TecAdmin
tecadmin.net › install-openjdk-java-ubuntu
OpenJDK 11/8 - Download And Install on Ubuntu/Debian - TecAdmin
April 26, 2025 - Use the below command to install ... system. You can install JRE package only to setup Runtime Environment only. OpenJDK 11 · sudo apt-get install openjdk-11-jre openjdk-11-jdk ·...
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-java-with-apt-on-ubuntu-22-04
How to Install Java with Apt on Ubuntu (JRE & JDK) | DigitalOcean
February 2, 2026 - To install the OpenJDK version of Java, first update your apt package index: ... OutputCommand 'java' not found, but can be installed with: sudo apt install default-jre # version 2:1.11-72build1, or sudo apt install openjdk-11-jre-headless # version 11.0.14+9-0ubuntu2 sudo apt install ...
🌐
AccuWeb Hosting
manage.accuwebhosting.com › knowledgebase › 3375 › How-to-Install-OpenJDK-JAVA-11or8-on-Ubuntu.html
How to Install OpenJDK JAVA 11/8 on Ubuntu? - AccuWebHosting
You should see options like openjdk-11-jre and openjdk-11-jdk in the list. # sudo apt-get install openjdk-11-jre openjdk-11-jdk
🌐
javathinking
javathinking.com › blog › jdk-11-install-linux
Installing JDK 11 on Linux: A Comprehensive Guide — javathinking.com
OpenJDK 11 is available in the default Debian/Ubuntu repositories. ... sudo apt install openjdk-11-jdk -y For runtime-only use (no development tools), install openjdk-11-jre instead.
🌐
AlexHost
alexhost.com › home › faq › linux › how to install openjdk on ubuntu 22.04: a complete step-by-step guide
How to Install OpenJDK on Ubuntu 22.04: A Complete Step-by-Step Guide
1 month ago - For development purposes, always install the JDK package. OpenJDK 11 is a Long-Term Support release that remains widely used in enterprise environments and is required by many legacy frameworks and tools. sudo apt install openjdk-11-jdk -y · OpenJDK 17 is the current recommended LTS version for new projects.
🌐
OneUptime
oneuptime.com › home › blog › how to install java (openjdk) on ubuntu
How to Install Java (OpenJDK) on Ubuntu
January 15, 2026 - # Install OpenJDK 21 (LTS, released September 2023) sudo apt install openjdk-21-jdk -y # Install OpenJDK 17 (previous LTS) sudo apt install openjdk-17-jdk -y # Install OpenJDK 11 (older LTS, still widely used) sudo apt install openjdk-11-jdk -y # ...
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-java-with-apt-on-ubuntu-20-04
How To Install Java with Apt on Ubuntu | DigitalOcean
February 5, 2026 - OutputCommand 'java' not found, but can be installed with: sudo apt install default-jre # version 2:1.17-75, or sudo apt install openjdk-17-jre-headless # version 17.0.17+10-1~24.04 sudo apt install openjdk-21-jre-headless # version 21.0.9+10-1~24.04 sudo apt install openjdk-11-jre-headless # version 11.0.29+7-1ubuntu1~24.04 sudo apt install openjdk-25-jre-headless # version 25.0.1+8-1~24.04 sudo apt install openjdk-8-jre-headless # version 8u472-ga-1~24.04 sudo apt install openjdk-19-jre-headless # version 19.0.2+7-4 sudo apt install openjdk-20-jre-headless # version 20.0.2+9-1 sudo apt install openjdk-22-jre-headless # version 22~22ea-1 · Run the following command to install the default JDK:
🌐
DZone
dzone.com › coding › frameworks › installing openjdk 11 on ubuntu 18.04
Installing OpenJDK 11 on Ubuntu 18.04
October 1, 2018 - % sudo sh -c 'for bin in ... matter of a package upgrade and which alternative switches to use. % sudo apt-get install --only-upgrade default-jdk % update-alternatives --config java There are 2 choices for the alternative ...
🌐
Medium
medium.com › @jacob.swanson.n › installing-the-actual-openjdk-11-on-ubuntu-18-04-f60c4e08ebb0
Installing the actual OpenJDK 11 on Ubuntu 18.04 | by Jacob Swanson | Medium
December 18, 2018 - $ sudo apt install openjdk-11-jdk $ java -version openjdk version "10.0.2" 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)