I used the below apt command to install OpenJDK 11
sudo apt install openjdk-11-jdk
But, OpenJDK 10 got installed, result of java --version
openjdk 10.0.1 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)
After apt update
Output of sudo apt-cache policy openjdk-11-jdk
openjdk-11-jdk:
Installed: 10.0.1+10-3ubuntu1
Candidate: 10.0.1+10-3ubuntu1
Version table:
*** 10.0.1+10-3ubuntu1 500
500 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
100 /var/lib/dpkg/status
How to install OpenJDK 11?
Ubuntu version: 18.04
sudo apt update
before installing the package? Please [edit] your question and add the output ofapt-cache policy openjdk-11-jdk
. Also, mention the Ubuntu version you're using. – Kulfy Sep 27 '20 at 13:34grep security /etc/apt/sources.list
? – Kulfy Sep 28 '20 at 17:24