Re: Use of update-alternatives or JAVA_HOME (was: Experience in converting to GCJ)
On Mon, Aug 11, 2003 at 04:40:11PM -0400, Michael R Head wrote:
> On Mon, 2003-08-11 at 16:18, Matt Zimmerman wrote:
> > This is what update-alternatives does.
>
> 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.
Which is, of course, one of the ways in which alternatives are intended to
be used.
> 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.
Which is something that Unix users have been able to do since the dawn of
time, in a more generic way, with a different environment variable (namely
PATH).
> 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).
I don't follow. To use a package with a particular JDK, you point it to
that particular JDK. alternatives provide a list of available JDKs, as well
as a default for the system.
> 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.
What do is missing that can't be addressed by alternatives and PATH?
--
- mdz
Reply to: