查找后发现是jdk版本问题 项目属性---->javaCompiler中的complier compliance level 将1.5改为1.6 把Eclipse中这个调高就可以了 参考:http://blog.csdn.net/skylen/article/details/6198699