Uninstall Java 9


I want to uninstall everything related to java 9 in linux, in order to install Oracle Java 1.8.

When entering java -version I get: " -bash: /usr/bin/java: No existe el archivo o el directorio" . But when doing javac -version I get "javac 9.0.1" .

What is it? Could it be that the java package has not been completely uninstalled yet? How can I erase everything?

asked by Weeknd23 03.04.2018 в 00:03

1 answer


You can install java 8 without it coming into conflict, what you should do is place java 8 as defect

sudo update-alternatives --config java
sudo update-alternatives --config javac

These commands determine which specific version of java you want to work with

If you are using a Ubuntu-based distro you can add the webupd8 repository

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get install oracle-java8-installer
sudo update-java-alternatives -s java-8-oracle
sudo apt-get install oracle-java8-set-default
answered by 03.04.2018 / 18:35