Access restriction: The type Resource is not accessible due to restriction on required library

Access restriction: The type Resource is not accessible due to restriction on required library

是访问限制报错.

  • 方法一:

全局属性Project>preferences>java>Compiler>Errors/Warnings>把右侧的【Deprecated and restricted API>Forbidden reference的Error】置为【Warning】.

Access restriction: The type Resource is not accessible due to restriction on required library_第1张图片
image.png
  • 方法二(终极方法:)

项目属性preferences>java build path>把右侧【libraries中的JRE System Library】删除重新导入.


来源:网络资料。

你可能感兴趣的:(Access restriction: The type Resource is not accessible due to restriction on required library)