Environment variables in Eclipse
I've created an eclipse plugin for this, because I had the same problem. Feel free to download it and contribute to it.
It's still in early development, but it does its job already for me.
https://github.com/JorisAerts/Eclipse-Environment-Variables
The .bashrc file is used for setting variables used by interactive login shells. If you want those environment variables available in Eclipse you need to put them in /etc/environment.
You can also define an environment variable that is visible only within Eclipse.
Go to Run -> Run Configurations... and Select tab "Environment".
There you can add several environment variables that will be specific to your application.
You can set the Hadoop home directory by sending a -Dhadoop.home.dir to the VM. To send this parameters to all your application that you execute inside eclipse, you can set them in Window->Preferences->Java->Installed JREs-> (select your JRE installation) -> Edit.. -> (set the value in the "Default VM arguments:" textbox). You can replace ${HADOOP_HOME} with the path to your Hadoop installation.