Update-alternatives
From KevinWiki
update-alternatives
Config
$ sudo update-alternatives --config java There are 2 alternatives which provide `java'. Selection Alternative ----------------------------------------------- 1 /usr/lib/jvm/java-6-sun/jre/bin/java *+ 2 /usr/lib/jvm/java-6-openjdk/jre/bin/java Press enter to keep the default[*], or type selection number: 1 Using '/usr/lib/jvm/java-6-sun/jre/bin/java' to provide 'java'.
$ ls -l /etc/alternatives/java lrwxrwxrwx 1 root root 36 2008-09-20 21:11 /etc/alternatives/java -> /usr/lib/jvm/java-6-sun/jre/bin/java