How do I install multiple versions of Java on Ubuntu?
Answer
To switch between installed java versions, use the
update-java-alternatives command.
… where /path/to/java/version is one of those listed by the previous command (e.g. /usr/lib/jvm/java-7-openjdk-amd64 ).