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
๐ŸŒ
SysAdminXpert
sysadminxpert.com โ€บ home โ€บ java โ€บ how to upgrade java 8 to java 11 on ubuntu 20
How To Upgrade Java 8 To Java 11 On Ubuntu 20 | SysAdminXpert
January 3, 2024 - This article will show you how to upgrade Java 8 to Java 11 on Ubuntu 20.04. Java is one of the most popular programming languages in the world, used for building a wide range of applications from desktops to mobile and web applications. Java 11, also known as Java SE 11, is a long-term support (LTS) version of the Java programming language, and it provides several new features and enhancements over its predecessor, Java 8.
๐ŸŒ
W3Schools Blog
w3schools.blog โ€บ home โ€บ upgrade java 8 to 11 in ubuntu
Upgrade java 8 to 11 in ubuntu - W3schools.blog
January 27, 2022 - sudo apt-get install openjdk-11-jdk $ sudo update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status * 0 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1500 auto mode 1 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java ...
๐ŸŒ
Programshelp
programshelp.com โ€บ help โ€บ java โ€บ how_to_upgrade_java_8_to_11_in_ubuntu.html
How to upgrade java 8 to 11 in ubuntu
sudo apt-get install openjdk-11-jdk $ sudo update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status * 0 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1500 auto mode 1 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java ...
๐ŸŒ
LinuxBabe
linuxbabe.com โ€บ home โ€บ how to install oracle java 8 and openjdk 11 on ubuntu 22.04, 20.04
How To Install Oracle Java 8 and OpenJDK 11 on Ubuntu 18.04, 19.04
October 27, 2022 - This will also install the openjdk-11-jre package, which contains the Java runtime environment and is required to run Java programs. Once the installation is complete, check version number. ... openjdk 11.0.4 2019-07-16 OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu220.04) OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu220.04, mixed mode, sharing) First, you need to run the following commands to add JDK 8 to the alternatives system.
๐ŸŒ
Ubuntu
ubuntu.com โ€บ tutorials โ€บ install-jre
Install the Java Runtime Environment | Ubuntu
Oracle does not currently offer JRE packages for Java 11 or above from their website so, for this tutorial, we will use the Oracle HotSpot JRE version to be 8u291 (Java 8, update 291).
Find elsewhere
๐ŸŒ
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
๐ŸŒ
JetPatch
kc.jetpatch.com โ€บ hc โ€บ en-us โ€บ articles โ€บ 20698538476173-Transitioning-from-Java-8-to-Java-11-for-JetPatch
Transitioning from Java 8 to Java 11 for JetPatch โ€“ JetPatch
Ensure the output reflects Java 11 as the JAVA_HOME path. Locate the Java 8 or other unsupported Java versions for removal: ... Use the sudo rpm -e --nodeps package_name command to remove each package, replacing package_name with the actual name of the Java 8 packages identified. ... Upgrade to this build and verify JetPatch is running after the upgrade (see this article if there are any issues)
๐ŸŒ
OneUptime
oneuptime.com โ€บ home โ€บ blog โ€บ how to install and switch java versions on ubuntu
How to Install and Switch Java Versions on Ubuntu
March 2, 2026 - Ubuntu's repositories include OpenJDK ... # Install a specific version sudo apt install openjdk-8-jdk # Java 8 sudo apt install openjdk-11-jdk ......
๐ŸŒ
Lucee Dev
dev.lucee.org โ€บ support
Java upgrade from 8 to 11 - support - Lucee Dev
December 1, 2021 - I would like to upgrade java from 1.8.0_292 to 11.0.11. I installed java on the machine: # java --version openjdk 11.0.11 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Seโ€ฆ
๐ŸŒ
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 - By default, Ubuntu includes OpenJDK 11, which is an open-source variant of the JRE and JDK. 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 openjdk-17-jre-headless # version 17.0.2+8-1 sudo apt install openjdk-18-jre-headless # version 18~36ea-1 sudo apt install openjdk-8-jre-headless # version 8u312-b07-0ubuntu1
๐ŸŒ
Ubuntu Shell
ubuntushell.com โ€บ change-java-version
How to Change Java Version on Ubuntu (CLI and GUI)
November 16, 2025 - Discover a step-by-step guide to change the default version of Java using the CLI and GUI methods on the Ubuntu system.
๐ŸŒ
Medium
ktsravindu.medium.com โ€บ installing-java-8-and-11-on-the-same-ubuntu-20-04-4d5aaf10a3a4
Installing Java 8 and Java 11 on the same Ubuntu 20.04 | by Shehan Ravindu | Medium
January 4, 2022 - JAVA_HOME=โ€/usr/lib/jvm/java-8-openjdk-amd64"#JAVA_HOME=โ€/usr/lib/jvm/java-11-openjdk-amd64" ... You can use the following command to uninstall the Java version that you want.
๐ŸŒ
Medium
medium.com โ€บ globant โ€บ migrating-to-java-11-from-java-8-bd6343107ea6
Migrating to Java 11 from Java 8. Overview | by Krunal Hedaoo | Globant | Medium
September 8, 2021 - In this article, we will try to understand what it takes to migrate a maven based spring boot application from Java 8 to Java 11. We will take a look at some prerequisites, changes to be done based on libraries being deprecated in the newer version and few issues that might occur after moving the application to Java 11. Let us look at some prerequisites first. 1. Java Version Upgrade the java.version property in your pom.xml.
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ sysadmin โ€บ how to install java on ubuntu
How to Install Java on Ubuntu
February 20, 2025 - Simple step-by-step guide on how to install java on Ubuntu, and any other Ubuntu-based distribution. Get started with Java today!