user3162140
user3162140

Reputation: 511

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

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

Upvotes: 12

Views: 21346

Answers (1)

mszalbach
mszalbach

Reputation: 11460

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

Upvotes: 19

Related Questions