-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John L Fjellstad wrote:
> 
> The way the did it at computer lab at my school, was to create a bunch
> of scripts that you had to call to get the version of program you
> wanted.
> 
> Say, you wanted java-1.5.  It is probably contained inside
> /usr/lib/jvm/java-1.5.0-sun.  Create a script that sets the PATH to
> include the bin directory.  Something like this:
> 
> JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
> JDKDIR=$JAVA_HOME
> PATH=$JAVA_HOME/bin:$PATH
> CLASSPATH=$JAVA_HOME:`dirname $JAVA_HOME`/jdbc/classes12.zip:.
> MANPATH=$MANPATH:$JDKDIR/man
> export JAVA_HOME JDKDIR PATH CLASSPATH
> 
> Now, this path will before the one /usr/bin, so it will be searched
> first.
> 
> You can put this script in your .bashrc.  If you have sun java 6
> installed, or gcj or whatever, you could just do something similar as
> long as they reside in their own directory structure.
> 
> For compilers, you could export CC and CXX and only use those variables
> in your makefile, I guess.
> 
Thank you for your suggestions. I think adding a directory to PATH is
suitable if there is a lot of executables in it. Maybe Java is indeed in
such a case.

I know that there are ways. What I proposed was just another possible
one that could help users select alternatives *automatically*, in some
cases, by extending the functions of `update-alternatives` a little. It
was inspired by a program called `im-switch`.

- --
Cheers,

Wei Chen
http://www.acplex.com/people/wchen/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGK5G+CIqXQV6BF28RAjsNAKDBMwjftwGlCsLkMLP8MhY6UGIheQCfSqjU
NE7XOdAesCZkTXjhpV0Yc2U=
=zN6A
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to