Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install java9 on ubuntu

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

like image 575
spectre009 Avatar asked Jun 24 '18 14:06

spectre009


People also ask

How do I install the latest JDK on Ubuntu?

How to install Open JDK (Java developement kit) in Ubuntu (Linux)? For JAVA_HOME (Environment Variable) type command as shown below, in "Terminal" using your installation path... (Note: /usr/lib/jvm/java-8-openjdk is symbolically used here just for demostration. You should use your path as per your installation.)


2 Answers

do

sudo apt install default-jre default-jdk
like image 171
JosephWorks Avatar answered Sep 23 '22 04:09

JosephWorks


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.

like image 26
vladr Avatar answered Sep 26 '22 04:09

vladr