关于Access restriction: The type 'DataSource' is not API错误的解决方法

出现如下的错误:
关于Access restriction: The type 'DataSource' is not API错误的解决方法
解决方法:
Project -> Properties -> Java Build Path -> Libraries,选中JRE System Library,然后Remove。再点击Add Library -> JRE System Library -> next,选择Alternatie JRE,点击Installed JREs,选择jdk同级目录下的jre即可,然后依次点击Apply -> ok即可。
关于Access restriction: The type 'DataSource' is not API错误的解决方法
祝君好运!