I\'m not quite sure how I got into this mess, but for some reason I\'m not able to change the current version of Java using alternatives. I can run alternatives --config java a
alternatives
works by changing a symlink in the /usr/bin
directory. However, if your path contains a valid executable earlier in the path, that will be used instead.
In this case, judging from your previous comments, it sounds like /usr/java/jdk1.5.0_10/bin
is somewhere in the path and should be removed.
For a BASH shell, the path is usually set in ~/.bashrc
or (less likely?) ~/.bash_profile