Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install openjdk-9-jdk on Ubuntu 18.04?

Tags:

java

ubuntu

I use ubuntu 18.04, when I launch

sudo apt install openjdk-9-jdk 

I get the following message

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openjdk-9-jdk

how do I install it correctly?

Thanks

Sergio

like image 579
user3162140 Avatar asked Jul 02 '18 17:07

user3162140


1 Answers

Tested with Ubuntu 18.04 docker image:

It did not have a package openjdk-9-jdk it only provides openjdk-8-jdk and openjdk-11-jdk. The 9 version is superseded by the 11 version (see http://jdk.java.net/9/). So it is recommended to use the openjdk-11-jdk if possible.

Check with:

sudo apt-cache search openjdk

If you really need the 9er version get it manually via http://jdk.java.net/archive/.

like image 123
mszalbach Avatar answered Nov 05 '22 14:11

mszalbach