Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've got java-6-openjdk and java-7-openjdk running on Natty (11.04) on one machine and successfully toggle between them using

update-alternatives --config java 

For some reason this doesn't seem to work on a second machine of identical spec. The sym links in /etc/alternatives gets updated when i run update-alternatives but when i check java -version or which java it's always java-6-openjdk. I've been running java 7 using the entire path but this isn't ideal as I don't want to clutter build files with path names.

Any suggestions on what else I need to do to get update-alternatives to work ?

share|improve this question
Do you tried to logout or test from a new terminal window? –  smonff Nov 19 '13 at 17:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.