Google search reveals that "/etc/environment" can be used in OS X to set global environment variables (like JAVA_HOME etc, in key-value pairs). I have tried to add following string to this file on OS X Lion:
sudo sh -c 'echo "FOO=bar" >> /etc/environment'
But after rebooting OS X,
echo $FOO displays empty string.
Am I doing something wrong or is the information on the internet misleading and "/etc/environment" can't be used in OS X, and am I limited to "/etc/launchd.conf"?