7

I already have java8 working but when I try to install java9 this is what happens everytime:

sudo apt-get install oracle-java9-installer

Reading package lists... Done Building dependency tree Reading state information... Done Package oracle-java9-installer is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'oracle-java9-installer' has no installation candidate

Hriday Modi
  • 2,001
  • 15
  • 22
spectre009
  • 124
  • 1
  • 1
  • 10

2 Answers2

6

do

sudo apt install default-jre default-jdk
Roshana Pitigala
  • 8,437
  • 8
  • 49
  • 80
JosephWorks
  • 682
  • 4
  • 21
4

It seems Oracle stopped supporting Java 9 so the PPA does not contain Java9 installer anymore. There is nothing wrong on your end, with your machine.

It looks like Java9 is a short-term support version, and so will java 10 be too. Java 11 will be a LTS support. For more details on the new Java release approach see this answer.

Because this, you can't install Java9 using the ppm anymore, you have to do it manually. You will have to go to the java 9 archive downloads, log in with an Oracle account, download the .tar.gz, extract the .tar.gz and copy it to the install location.

vladr
  • 41
  • 5