project---->properties--->Libraries--->JRE System Library--->Access rules--->Edit--->Add--->Rule Paern 写上**
或者
1. Open project properties.
2. Select Java Build Path node.3. Select Libraries tab.4. Remove JRE System Library.5. Add Library JRE System Library.