Command to switch Java version in Ubuntu

In the case where multiple versions of Java are installed the following command will allow you to set the Java Runtime Engine (JRE) to a version of your choice:

sudo update-alternatives --config java

To update the Java compiler run:

sudo update-alternatives --config javac


Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.