title: Linux/bash environment variable is null when reading from java
body: <p>In Ubuntu I have exported the below environment variable in <strong>~/.bashrc</strong>:</p>
  
  <pre><code>export MY_VAR="MY_VAR_VALUE"
  </code></pre>
  
  <p>When I re-open a terminal I can do:</p>
  
  <pre><code>~ $ echo $MY_VAR
  MY_VAR_VALUE
  ~ $ 
  </code></pre>
  
  <p>But when I do this in Java/Eclipse (which I have restarted after exporting the test env. var):</p>
  
  <pre><code>String myVar = System.getenv("MY_VAR");
  System.out.println(myVar);
  </code></pre>
  
  <p>I just get <strong>null</strong>. Does eclipse not see variables set in ~/.bashrc ?</p>