title: Environment variables in Eclipse
body: <p>I am able to run a sample hadoop program from the command prompt and am trying to run the same program from Eclipse, so that I can debug it and understand it better.</p>
  
  <p>For the command line program, some environment variables are set in the <code>.bashrc</code> and the same are being read as <code>System.getenv().get("HADOOP_MAPRED_HOME")</code> in the hadoop program. But, when I am running a java program with <code>System.getenv().get("HADOOP_MAPRED_HOME")</code>, from Eclipse I am getting null.</p>
  
  <p>I tried passing <code>-DHADOOP_MAPRED_HOME=test</code> to VM parameters in the runtime configurations from Eclipse, but still getting null in the standalone program. How to make the environment variables visible within Eclipse? When I iterate through <code>System.getenv()</code> in Eclipse, I see lot of variables like <code>DISPLAY</code>, <code>USER</code>, <code>HOME</code> and others. Where are they set? I am using Ubuntu 11.04.</p>