I'm using Ubuntu 14.04 with multiple java versions. I'm trying to change the current java version for my user with:
sudo update-alternatives --config java
sudo update-alternatives --config javac
I change to the right one but when I do:
java -version
I still receive the old one. When I do:
sudo java -version
I receive the new one.
I need the new java version to be set for my user (without sudo
).
How can I do it?