Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

closed as off-topic by A.B., Fabby, Eric Carvalho, Andrea Corbellini, David Foerster Aug 19 '15 at 20:04

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – A.B., Fabby, Eric Carvalho, Andrea Corbellini, David Foerster
If this question can be reworded to fit the rules in the help center, please edit the question.

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