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
TecAdmin
tecadmin.net › install-oracle-java-11-on-ubuntu-16-04-xenial
How To Install Oracle Java 11 on Ubuntu 16.04 LTS (Xenial) – TecAdmin
April 26, 2025 - You need to add the following PPA to your Ubuntu system. This PPA contains a package oracle-java11-installer having the Java installation script. ... Then install Java 11 using the script provided in these packages. This script downloads the Java archive from the official site and configures ...
What is the point of all these new Java versions when Java 8 is all that seems to be supported by most apps?
Because they switched to a new release model which allows for them to get new features out faster. Same thing happened when Firefox and chrome switched to a timed release model. People bitched about version numbers but slowly got use to the fact that "I don't really care that this is firefox 82". From an organization standpoint, this has been great for the Java getting features out. It used to be that they'd say "Ok, we are going to target key feature X for java Y". The problem with that is nearly all project development got devoted to that feature and ultimately "when" java would go out was completely unknown. Further, releases where crazy times for JDK developers. With the new model, they've been able to work on a lot more features in parallel. A ton of usability features made it in (records, pattern matching, string literals) which never would have made it in the old model. Further, it's allowed them to slowly walk in huge features (Valhalla, loom, etc) making pre-emptive changes needed to support massive changes in the future. Post Java 9, the upgrades have been a breeze. Honestly, I almost wish they'd move to an even faster release model to really force people to stop caring so much about these version numbers. Rust does a release every 6 weeks and I think that works great. Nobody cares that it's now Rust 1.50 or whatever. More on reddit.com
Thinkorswim on Ubuntu
this was a little tricky but I have gotten it to work.First you want to get Java 8 installed.Once you install Java,then you need to choose the version cause itll make Java 11 default,once you change it to 8,then the installer runs just fine. Also remember to change the installer to be "executing"(right click,properties,check the box). I think with your case,you should just run this to change it to 8 because I ran into the same issue and once I switched it to 8,I had no problems. sudo update-java-alternatives -s java-8-oracle I should note I am using LTS 18.04 but it should work if youre on 18 or 19 More on reddit.com
Videos
12:26
How To Install Oracle Java (JDK) On Ubuntu 24.04 LTS, Debian Linux ...
05:19
How to Install Java on Ubuntu and set JAVA_HOME (2025 UPDATE) #JDK ...
06:01
Install Java 11 in Ubuntu or Debain Linux - YouTube
How To Install Oracle Java (JDK) On Ubuntu 24.04 LTS ...
07:59
How to Install openjdk 11 on Ubuntu 22.04 | Step-by-Step Tutorial ...
Ubuntu
ubuntu.com › tutorials › install-jre
Install the Java Runtime Environment | Ubuntu
(Alternatively, you may opt to use a specific Java version, using for example the openjdk-11-jre package; as updates are released for that version of the Java Virtual Machine, that packages will be updated, allowing you to stick to the latest and greatest update of one specific version of the Java language.)
Top answer 1 of 2
2
Just do this after installing,
sudo nano /etc/environment
JAVA_HOME="/usr/lib/jvm/jdk-11.0.8"
Note that, /bin is not to be included. Save and exit. Then,
source /etc/environment
Btw, why complicate a normal installation?
2 of 2
0
You can probably install java 11 by the following command
sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt-get install openjdk-11-jdk
You can refer this link to see how to install openjdk 11 on ubuntu.
Then you can run the
update-alternatives --config java
to update the java version. You can refer this link to see how to update java alternatives.
GitHub
gist.github.com › peteristhegreat › 4cc299a10c73a7eeb09594ad453b4b52
Installing Java 11 on ubuntu · GitHub
$ md5 jdk-11* MD5 (jdk-11.0.14_linux-x64_bin (1).tar.gz) = c2037b5f2e2a6ddcfbdfe1489bccfd63 MD5 (jdk-11.0.14_linux-x64_bin.tar.gz) = c2037b5f2e2a6ddcfbdfe1489bccfd63 · After all the things above, you can just use the download link from oracle in your script. Here's my working script. #!/usr/bin/env bash export DEBIAN_FRONTEND=noninteractive # set -x cache_folder=/var/cache/oracle-jdk11-installer-local/ sudo mkdir -p $cache_folder #url='https://download.oracle.com/otn/java/jdk/11.0.4+10/cf1bbcbf431a474eb9fc550051f4ee78/jdk-11.0.14_linux-x64_bin.tar.gz' #url='https://download.oracle.com/otn/jav
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 - You can install a specific version of Java on your Ubuntu system by using the apt command. For example, to install Java 11, you can run the following command:
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
Mkyong
mkyong.com › home › java › how to install java jdk on ubuntu
How to install Java JDK on Ubuntu - Mkyong.com
March 29, 2021 - This tutorial shows you how to install OpenJDK 8, 11, and 16 on Ubuntu 20, apt install automatically, manual installation, switch different JDK versions, etc.
TutorialsPoint
tutorialspoint.com › how-to-install-java-with-apt-get-on-ubuntu-16-04
How to Install Java with Apt-Get on Ubuntu 16.04
Need to get 11.9 MB of archives. ..................................................................................... To install the oracle JDK, use the following command – ... Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA. More info (and Ubuntu installation instructions): - for Oracle Java 7: <a href="http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html" rel="nofollow noopener noreferrer" target="_blank">http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.htm