Does /etc/profile when the system starts up or does it only execute when a user logs in? I need to set my JAVA_HOME variable for Tomcat when the system starts up. In my /etc/rc.d/rc.local file I have: JAVA_HOME=/usr/local/java.sdk export JAVA_HOME but when I try to startup Tomcat from the command line as root I get: The JAVA_HOME environment variable is not defined This environment variable is needed to run this program I "echo $JAVA_HOME" and it give me blank lines, as if $JAVA_HOME was never set. I am doing this right, aren't I?