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 Top answer 1 of 12
529
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)
2 of 12
125
To install Openjdk 11 in Ubuntu, the following commands worked well.
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt install openjdk-11-jdk
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
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
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
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
Videos
01:58
Installing Java 11 on your Linux Ubuntu system using OpenJDK -- ...
07:59
How to Install openjdk 11 on Ubuntu 22.04 | Step-by-Step Tutorial ...
11:22
How to Install OpenJDK 11 and OpenJDK 8 on Ubuntu 20 04 LTS| How ...
04:34
THE STEPS TO CORRECTLY INSTALL OpenJDK11 - YouTube
04:40
How to install Java on Ubuntu with apt - YouTube
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 ·
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
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.
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: