解决办法: 右键项目-->properties-->java Build path-->Libraries->删除JRE System Library ,然后重新add JRE System Library,即可解决问题。