2009年3月25日 星期三

Use "alternative" to administer different version of same package

We can issue the command listed as below to administer different version of same package in Ubuntu. I use sun-java-sdk as an example in this article.

$ sudo update-alternatives --config javadoc

After issued the command, you can see the prompt as below.

There are 2 alternatives which provide `javadoc'.

Selection Alternative
--------------------------------------------------------------------------------
1 /usr/lib/jvm/java-6-sun/bin/javadoc
* 2 /usr/lib/jvm/java-1.5.0-sun/bin/javadoc


Press enter to keep the default[*], or type selection number:

Now, make your choice to decide which version that you want to use.

You can use the command to check which version of the package is you use currently.

$ sudo update-alternatives --display java

沒有留言:

張貼留言