title: How to set java environment variable on mac
body: <p>How do I set a java environment variable that can be read with <code>System.getenv()</code> on Mac OS X Lion? I developing in Eclipse.</p>
  
  <p>I used this command in the terminal <code>export VAR_NAME=Value</code> but <code>System.getEnv(VAR_NAME)</code> returns <code>null</code>.</p>
  
  <p>I tried <code>java -DVAR_NAME=Value</code> but nothing is executed. I only get the java arguments help.</p>
  
  <p>I created in my current project folder the file <code>.bash_profile</code> with the content: <code>export VAR_NAME=Value</code>. It's not working.</p>
  
  <p>I also created the folder <code>.MacOSX</code> with a single file inside <code>environment.plist</code> and in this file I wrote the property and its value using XCode. Nothing is working.</p>
  
  <p>How do I do it?</p>