TL;DR update
In April 2019, OpenJDK 11 can now be installed with ʻapt` on Ubuntu Linux 18.04 LTS as well.
After that, it will be the past information.
OpenJDK 11 will be included without any problems.
##OS version
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.10 (Cosmic Cuttlefish)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.10"
VERSION_ID="18.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=cosmic
UBUNTU_CODENAME=cosmic
##OpenJDK 11 installation
$ sudo apt install openjdk-11-jdk
$ java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-2ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-2ubuntu1, mixed mode, sharing)
For Ubuntu Linux 18.04 LTS, if you install ʻopenjdk-11-jdk with ʻapt
, you will get the following status.
##OS version
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
##OpenJDK 11 installation
$ 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.3)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3, mixed mode)
ʻOpenjdk-11-OpenJDK 10 is installed even though it is set to jdk`.
This is because OpenJDK 11 was not released at the time of Ubuntu Linux 18.04 LTS release, so make sure that OpenJDK 10 is the default and replace later. -release / 2018-February / 004275.html) It seems that you intend.
However, it has been a while since OpenJDK 11 was released at this point, but it seems that it is still OpenJDK 10 and has not been switched.
So, if you can't install OpenJDK 11 with ʻapt` on Ubuntu Linux 18.04 LTS, you can install it by using PPA.
“PPA for OpenJDK uploads (restricted)” team
Below, the command.
$ sudo add-apt-repository ppa:openjdk-r/ppa
$ sudo apt update
$ sudo apt install openjdk-11-jdk
It takes a lot of time, and a little old and mysterious OpenJDK 11 is installed.
$ sudo apt install openjdk-11-jdk^C
$ java -version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment (build 11+24-Ubuntu-118.04)
OpenJDK 64-Bit Server VM (build 11+24-Ubuntu-118.04, mixed mode, sharing)
At this point, if you really want to install OpenJDK 11 with ʻapt` on Ubuntu Linux 18.04 LTS, this is the way to go.
Or wait a little longer or upgrade to Ubuntu Linux 18.10.
Let's install AdoptOpenJDK etc. while referring to the following.
Introduction to Java 11: Support and JVM Features #jjug
You can also install it with sdkman.
Personally, I'll wait for it to be backported to the Ubuntu Linux 18.04 LTS ʻapt` repository.
openjdk-lts 11.0.1+13-2ubuntu1 source package in Ubuntu
“PPA for OpenJDK uploads (restricted)” team
Anyone know when openjdk-11-jdk packages in Ubuntu Bionic / Cosmic Will Actually Point to Java 11?
Recommended Posts