Update: The link below does not have a complete answer. Having to set the path or variable in two places (one for GUI and one for shell) is lame.
Not Duplicate of: http://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x
Coming from a Windows background where it's very easy to set and modify environment variables (just go to System Properties > Advanced > Environment Variables), it does not seem to be that straight forward on Mac OS 10.5. Most references say I should update /etc/profile or ~/.profile. Are those the equivalent of System Variables and User Variables? For example, where should I set my JAVA_HOME variable?
EDIT:
I want to be able to access the variable from the terminal as well as an app like Eclipse. Also, I hope I don't have to restart/logout to make this take effect.