How Do I Stop Oracle Jdk from Hijacking Path and Breaking Update-Alternatives?
I Installed Oracle Jdk on Ubuntu 14.04. Now I Want to Toggle Back to Openjdk: Sudo Update-Alternatives --Config Java Sudo Update-Alternatives --Config Javac...
I installed oracle jdk on ubuntu 14.04. Now I want to toggle back to openjdk:
sudo update-alternatives --config java
sudo update-alternatives --config javac
But it doesn't work. It seems oracle's jdk somehow keeps adding itself to my $PATH:
...:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:...
I've found and killed /etc/profile.d/jdk.csh, but there seems to be a failsafe. The audacity!!
How can I fix this?
1 Answer
I think you are on the right track by removing /etc/profile.d/jdk.csh and /etc/profile.d/jdk.sh. You just have to re-login or reboot so that the PATH changes have effect.