[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Use of update-alternatives or JAVA_HOME (was: Experience in converting to GCJ)



On Mon, 2003-08-11 at 16:18, Matt Zimmerman wrote:
> On Mon, Aug 11, 2003 at 09:58:03PM +0200, Jan Schulz wrote:
> 
> > What I would like to see:
> > 
> > * add a script/way to recognise/install/make known any installed
> >   /bin/java, together with some rules/infos, what cpabilities this 
> >   java has.
> > * add a script to java-common, which returns a appropriated java, based on
> >   . version and api needed
> >   . user settings in JAVA_HOME
> 
> 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.

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. 

mike

> 
> -- 
>  - mdz
-- 
Michael R Head <burner@suppressingfire.org>
http://suppressingfire.org/~burner/gpg.key.txt



Reply to: