Setting up env. variables at startup for all users (incl. root)

alexkywalker

Registered
How do I setup environment variables at startup with GLOBAL visibility

I am new to Macs and Mac OS X. I am running the following services on my Mac:
- Tomcat
- Jakarta Cactus
- JUnit
- Jakarta Ant

Every time I have to work with these I have to setup a JAVA_HOME and a CLASSPATH environment variables, using "setenv".

I already found how to automate this when a user (non-root) logs in, but I need these variables to be visible GLOBALLY.

Do you know how can I do this?

Thanks in advance.

Alejandro
 
You want to make the following files:
/etc/csh.login - this file should set the variables you want for csh and tcsh shells
/etc/profile - this file should set the variables for Bourne based shells (sh,ksh,bash)

This are run by the shell on login.

Brian
 
Originally posted by alexkywalker
Nope, I am using 10.1.5

Why the question? Are there any implications in the configuration that could be affecting me?

No, No. No implications and such. It is rather a personal issue.

What I mean is that I have been working with tomcat on my Mac OSX for a short while now. I was just starting to get up to running speed -i.e. I had just got all the applications I wanted to utilize in my development set up and running smoothly together - when 10.2 came out. And although I worried slightly about what might happen, when 10.2 arrived at my doorstep, I promptly installed it.

Since that time tomcat has not worked. Thus, after reading you post I thought that perhaps I had found a glimmer of light in what otherwise is a rather dark tunnel at present.

BTW perhaps you have already seen this page, but the page I used to setup tomcat is:

http://developer.apple.com/internet/java/tomcat1.html

Thanks for the info!

m(_ _)m
 
Back
Top