1

To uninstall java I followed this.

When I have uninstalled java completely , java -version shows openjdk version "11.0.1" . It's supposed to be no java at all, isn't it?. enter image description here

Then I've installed java 8, still java -version command yields openjdk version "11.0.1".

I need java for running a bioinformatics tool called Integrative Genomics Viewer(igv). After installing java 8 it continues to tell me I need java 8. enter image description here

Please help.

  • 2
    What is the output of apt list --installed | grep jdk? – Kulfy Dec 27 '18 at 06:56
  • which Java version(s) have you installed? 2) In Ubuntu/Debian you can install several versions/variants of the same package and then use the update-alternatives to make one the default.
  • – xenoid Dec 27 '18 at 07:15
  • I've used update-alternatives while both java 11 and java 8 were installed. But it didn't work so I decided to completely uninstall the java and only use java 8 (which I need at the moment). – Ahmed Abdullah Dec 27 '18 at 07:18
  • @Kulfy apt list --installed | grep jdk returns "WARNING: apt does not have a stable CLI interface. Use with caution in scripts." and no other result – Ahmed Abdullah Dec 27 '18 at 07:25
  • 1
    and output of which java and which javac? – Kulfy Dec 27 '18 at 07:31
  • With java, you don't use update-alternatives but update-java-alternatives as I described here. – danzel Dec 27 '18 at 09:53
  • @danzel I followed your answer https://askubuntu.com/a/740782/814468 before I tried removing java. It didn't work. Somehow I am stuck with java version 11 even when no java is installed apparently. – Ahmed Abdullah Dec 27 '18 at 09:56
  • @Kulfy openjdk version "11.0.1" & javac 11.0.1 – Ahmed Abdullah Dec 27 '18 at 10:01
  • How did you installed java 8? Also, which command usually returns path of executable file. Are you sure that is the output of which java and which javac? – Kulfy Dec 27 '18 at 10:05
  • for java 8 installation I followed commands provided by this page http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/ – Ahmed Abdullah Dec 27 '18 at 10:12
  • There is no need to follow those instructions unless you need oracle JDK. For installing JDK 8 you can simply use sudo apt install openjdk-8-jre openjdk-8-jdk since they are present in official repository. Let me know if it overwrites the existing settings. – Kulfy Dec 27 '18 at 10:32
  • Nope. still same problem – Ahmed Abdullah Dec 27 '18 at 10:35
  • How did you installed jdk11 in past? – Kulfy Dec 27 '18 at 10:41
  • I can't remember. – Ahmed Abdullah Dec 27 '18 at 11:02
  • And what about apt list --installed | grep jre? I'll suggest you to install openjdk-11 from repository once again using sudo apt install openjdk-11-jdk openjdk-11-jre and uninstall using sudo apt autoremove openjdk-11-jdk openjdk-11-jre to get of its all traces. – Kulfy Dec 28 '18 at 13:57