title: Java program not able to pick up environment variables mac
body: <p>Ive looked at several related links such as <a href="https://stackoverflow.com/questions/13748367/system-getenv-does-not-list-all-the-environment-variables">this</a> but my java program cant seem to pick up an environment variable defined in <code>/.bashrc</code>, <code>/.bash_profile</code></p>
  
  <p>Here's my <code>bash_profile</code> (bashrc is the same)</p>
  
  <pre><code>export JBOSS_HOME=/Applications/whp-jboss-cluster-5
  export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/
  export FDP_HOME=/Users/kodeseeker/Project/git_intuit/
  export TOMCAT_HOME=/Library/Tomcat/
  export GIT_HOME=/Users/kodeseeker/Project/git_intuit
  export MULE_HOME=/usr/local/mule/mule-enterprise-standalone-3.6.0-M2
  
  
  
  echo $MULE_HOME returns 
  /usr/local/mule/mule-enterprise-standalone-3.6.0-M2 as well. 
  </code></pre>
  
  <p>But printing </p>
  
  <pre><code> Map&lt;String, String&gt; env = System.getenv();
          for (String envName : env.keySet()) {
              System.out.println(
                                envName + " "+ 
                                env.get(envName));
          }
          System.out.println("****");
          System.out.println(env.get("MULE_HOME"));// returns null. 
  </code></pre>
  
  <p>Both use the same shell
  Shell in eclipse from output :</p>
  
  <pre><code>SHELL /bin/bash
  APP_ICON_12441 ../Resources/Eclipse.icns
  TMPDIR /var/folders/jc/bpc8py6s47jftq8mny923n4r5jfsj2/T/
  
  echo $SHELL
  /bin/bash
  </code></pre>
  
  <p>I've tried logging out, restarting the terminal etc. but with no avail. Any insight or links would be appreciated.</p>