Monday, February 09, 2009
update-alternatives
So you want to add another alternative to the
Assumptions: Sun's binary JDK installed to
Add all it's basic tools to the list as follows:
update-alternatives list in Ubuntu or Debian? Here's an example for Java.Assumptions: Sun's binary JDK installed to
/opt/java/jdk1.6.0_12/.Add all it's basic tools to the list as follows:
sudo update-alternatives --install /usr/bin/java java /opt/java/jdk1.6.0_12/bin/java 1or even simpler:
sudo update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.6.0_12/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /opt/java/jdk1.6.0_12/bin/javaws 1
for p in java javac javaws
do
sudo update-alternatives --install /usr/bin/$p $p /opt/java/jdk1.6.0_12/bin/$p 1
done