3

I am using Ubuntu 14.04 LTS 64 bit and installed the wrong version of Sun/Oracle's Java JDK (32 bit instead of 64 bit) using the Ask Ubuntu Post

I assume I have to uninstall it now. How can I do that?

1 Answers1

4

Run:

sudo update-alternatives --remove-all java
sudo update-alternatives --remove-all javac
sudo update-alternatives --remove-all javaws
sudo rm -rf /usr/lib/jvm/jdk1.8.0
kos
  • 35,891
  • @Testing360 No problem :) – kos Feb 24 '15 at 13:43
  • That last command is wrong. It will remove anything below ./jvm/. That could be just jdk1.8.0 but a lot more. – Rinzwind Feb 24 '15 at 14:25
  • @Rinzwind What could that be, aside from other installations of java, which have been excluded? – kos Feb 24 '15 at 14:33
  • @Rinzwind Plus notice that i specified "Assuming you have followed the tutorial exactly as described in the link", which implies the creation of such folder. – kos Feb 24 '15 at 14:35
  • @kos it could also have other versions of Java in /usr/lib/jvm/ and those would be removed as well. Your rm is missing jdk1.8.0/. You should expect users to just copy and paste the commands you provide. – Rinzwind Feb 24 '15 at 14:39
  • @Rinzwind Have you read the post? It states: "Assuming that you have only that installation of java", so it's logical that if that's not the case one shouldn't use those commands. – kos Feb 24 '15 at 14:49
  • @jos again: please assume users will just copy and paste commands. You are setting them up for a failure. – Rinzwind Feb 24 '15 at 14:52
  • @Rinzwind Ok, i changed my answer accordingly – kos Feb 24 '15 at 15:11