点击project----->propertys------>Java Build Path -----> Libraries---->Add Libraries----->JRE System Library------>选workspace default jre-------->finish,这样就OK了!