title: Environment variables in Mac OS X
body: <p>Update: The link below <em>does not have a complete answer</em>. Having to set the path or variable in two places (one for GUI and one for shell) is lame.</p>
  
  <p><strong>Not Duplicate of</strong>: <a href="https://stackoverflow.com/questions/135688/setting-environment-variables-in-os-x">Setting environment variables in OS X?</a></p>
  
  <hr>
  
  <p>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 <code>JAVA_HOME</code> variable?</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>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.</p>