D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] Ubuntu and Environment Variables

 

I've been looking at Ubuntu (specifically 5.10 - Breezy) for a while now. 
I want to setup a bunch of environment variables that are available to
services (Tomcat, JBoss) when I boot Ubuntu.  My naive
understanding is that anything placed in .bashrc or /etc/profile will be
available on a per user basis.  That's fine but I want to set an environment
variable for all users, e.g. JAVA_HOME.  Any ideas how I do this?

Also, when I installed the .deb packages via

https://help.ubuntu.com/community/Java

I noticed that what it did was to setup Java in:

/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/

then added a huge bunch of symbolic links to specific binaries under
/etc/alternatives to java, javac etc...

This seems all a bit weird, what I've done in the past is to install
Java under /usr/java/jdk where jdk is a symbolic link to the jdk
I wanted to use, setup an environment variable for JAVA_HOME
then add JAVA_HOME\bin to PATH.  This all seems like a better
option to me since I can swap JDK's with ease and uninstall very
very easily.

Can somebody explain the advantages of setting it up in /etc/alternatives instead? 
To me it looks more complex and more hassle to modify in the long run.

Cheers,
Jon.

--
#wEb: http://www.audiomonkey.co.uk
#eMaIl: jonathan.holloway@xxxxxxxxx
#pHoNe: 07968 902140
-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html