1、全局prefrence--java-complier:选择1.7
2、项目根目录,右键bulid path--config build path--libarary:增加指定jre
3、接上面,在preference的java complier,可以选择使用全局的设置(enable project specific settings)或者也可以自己定义单个项目的设置:可以使用execution enviroment或者自己选择complier compliance level
4、在启动服务:使用maven build时,打开run config--maven Bulid ---JRE,可以选择 Runtime JRE是那个。