1.eclipse->window>preferences->java->compiler->选择本地要用的Java版本
2.eclipse->window>preferences->java->installJars->修改为本地jdk
3.项目右键->buildPath configure Build Path->点击选项卡Libraries->选中JRE System Library->
点击edit->选中Alternate JRE->选择jdk
4.点击finish,点击ok,自动出现src/main/java和src/test/java
来自:http://blog.csdn.net/truong/article/details/17200967