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.
For the command line program, some environment variables are set in the .bashrc
and the same are being read as System.getenv().get("HADOOP_MAPRED_HOME")
in the hadoop program. But, when I am running a java program with System.getenv().get("HADOOP_MAPRED_HOME")
, from Eclipse I am getting null.
I tried passing -DHADOOP_MAPRED_HOME=test
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 System.getenv()
in Eclipse, I see lot of variables like DISPLAY
, USER
, HOME
and others. Where are they set? I am using Ubuntu 11.04.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…