On 11 Aug 2003, Michael R Head wrote: > I actually use update-alternatives to point to > /usr/local/lib/j2sdk/bin/java which is a symlink to j2sdk1.4.2 or > whatever the latest I have installed is. > > That said, using the JAVA_HOME variable (if it is set) allow a user on > the system to easily select which JDK to use. Now my users can just do > export JAVA_HOME=/home/me/my_own_special_jdk, and type 'java -version' > and have it work right. > As far as I know, alternatives can only be set by the system > administrator (and anyway, they certainly don't allow for multiple > environments to test a package against all the different JDKs). > > Of course, if you want all that support anyway, you might as well fiddle > with the PATH and set it to whichever java home directory you want. But > the point remains that alternatives isn't a perfect solution for the > multiple-(possibly-user-installed)-jdk problem.
It's possible to use update-alternatives as a user(it may not be easy, and could be made easier with appropriate patches).