Skip to content

Instantly share code, notes, and snippets.

@hanxue
Created November 23, 2012 10:21
Show Gist options
  • Save hanxue/4134916 to your computer and use it in GitHub Desktop.
Save hanxue/4134916 to your computer and use it in GitHub Desktop.
Change java to another default version
$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 manual mode
Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment