Here are steps:
1. create a java proj, using j2SE1.5 as your jre (to date it's the highest j2SE you can find in eclipse);
2. symlink src to src in hadoop
3. select proj->Build Path->configure build path, go to library tab
4. click "Add external JARs", and all jars from hadoop dir and lib dir
5. Switch to "Order and Export", check all hadoop-*.jars, click OK
6. select proj -> Refresh
That's it.
When you try to dereference a declaration of a obj, it may prompts you to "Attach file". Just attach to src folder should solve the problem.