I want to use OpenJDK 11 on Ubuntu Linux 18.04 LTS / 18.10

Thing you want to do

TL;DR update

In April 2019, OpenJDK 11 can now be installed with ʻapt` on Ubuntu Linux 18.04 LTS as well.

openjdk-lts package

After that, it will be the past information.

Target Ubuntu Linux version

For Ubuntu Linux 18.10 (Cosmic)

OpenJDK 11 will be included without any problems.

##OS version
$ cat /etc/os-release 
VERSION="18.10 (Cosmic Cuttlefish)"
PRETTY_NAME="Ubuntu 18.10"

##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)

Problem (for Ubuntu Linux 18.04 LTS (Bionic))

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 
VERSION="18.04 LTS (Bionic Beaver)"
PRETTY_NAME="Ubuntu 18.04 LTS"

##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.

When using Ubuntu Linux 18.04 LTS and giving up the installation with ʻapt`

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.

what will you do?

Personally, I'll wait for it to be backported to the Ubuntu Linux 18.04 LTS ʻapt` repository.

Reference information

openjdk-lts package in Ubuntu

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?

OpenJDK SRU exception

Recommended Posts

I want to use OpenJDK 11 on Ubuntu Linux 18.04 LTS / 18.10
I want to use Linux on mac
I want to use shortcut translation like DeepL app on Linux
I want to log file I / O on Linux
I want to realize something like AutoHotkey with AutoKey on Ubuntu (Kali Linux)
When you want to use python2.x on modern Gentoo Linux
I want to use Mac / emacs key bindings (keyboard shortcuts) on Ubuntu xkeysnail recommendations
I want to know how LINUX works!
How to use OpenVPN with Ubuntu 18.04.3 LTS
I want to use jar from python
I want to use IPython Qt Console
I want to use the Ubuntu desktop environment on Android for the time being (Termux version)
How to install php7.4 on Linux (Ubuntu)
On Ubuntu Linux, set Tab to q
I want to develop Android apps on Android
I want to use MATLAB feval with python
How to run MeCab on Ubuntu 18.04 LTS Python
I want to use ceres solver from python
I don't want to use -inf with np.log
I want to use ip vrf with SONiC
I want to do pyenv + pipenv on Windows
How to build Java environment on Ubuntu (Linux)
I want to use the activation function Mish
I want to use Python in the environment of pyenv + pipenv on Windows 10
I want to be notified when the command operation is completed on linux!
I want to use self in Backpropagation (tf.custom_gradient) (tensorflow)
How to use C216 Audio Controller on Arch Linux
I want to develop an Android application on Android (debugging)
less command I want to definitely remember this [linux command]
I want to find a popular package on PyPi
Preparing to use Ansible on an existing Linux server
I want to AWS Lambda with Python on Mac!
I want to restart CentOS 8 on time every day.
[Tips] How to use iPhone as webcam on Linux
I want to use the R dataset in python
I want to do Wake On LAN fully automatically
I want to use Linux commands at the command prompt! Use Linux commands at the command prompt instead of Git Bash
I installed tensorRT on Ubuntu 18.04
Use matplotlib on Ubuntu 12 & Python
I installed ROS on Ubuntu 18.04
USB Wifi on Ubuntu 20.04LTS
Use Github Desktop on Linux
I want to solve Sudoku (Sudoku)
I tried to reintroduce Linux
Use sshpass on Amazon linux2
Use Linux on Windows 10 (WSL2)
I want to use the latest gcc without sudo privileges! !!
How to use Fujifilm X-T3 as a webcam on Ubuntu 20.04
I want to use R functions easily with ipython notebook
How to share OS and Vim clipboard on Ubuntu 18.04.3 LTS
[For beginners] How to use for statements on Linux (variables, etc.)
I installed FreeCAD on Linux (Ubuntu) and created an icon
[Python] I want to use the -h option with argparse
I want to disable interrupts on Raspberry Pi (≒ DI / EI)
I want to announce my graduation thesis on IPython Notebook
I want to use a virtual environment with jupyter notebook!
[AWS EC2] Settings you want to do on Amazon Linux 2
What to do if you can't use WiFi on Linux
I want to use VS Code and Spyder without anaconda! !! !!
Use Xming to launch an Ubuntu GUI application on Windows.
When I tried to build a Rails environment on WSL2 (Ubuntu 20.04LTS), I stumbled and fell.