解决办法:Windows->Preferences-->java->Compiler-->compiler compliance level设置成1.6 窗口-> 首选项->Java->编译器->编译器一致性级别 设置成1.6