Add ppa. (I think it's a relatively famous ppa, but if you can't trust it, try a different method.)
$ sudo add-apt-repository ppa:webupd8team/java
Update.
$ sudo apt update
Let's see if java9 can be installed.
$ apt search java9
You found it properly.
Let's install oracle-java9-installer.
Now install!
$ sudo apt install oracle-java9-installer
Let's wait patiently.
If java8 is included, you will be asked if you want to remove it during the installation.
Congratulations
Recommended Posts