xiaofengkang

调用CachedRowSetImpl类时,出现以下错误:

Access restriction: The type CachedRowSetImpl is not accessible due to restriction on required library C:\glassfish3\jdk7\jre\lib\rt.jar

问题原因:

1.没有rt.jar包,不过这种情况出现的可能性比较小

2.eclipse的设置问题(一般都是这个原因)

问题解决:

(1) 一般方法:要在project build path中先移除JRE System Library,再添加库JRE System Library,之后就可以了。

(2) 暴力方法:它默认把这些受访问限制的API设成了ERROR,我们只要把
Windows->Preferences->Java->Complicer->Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过了

分类:

技术点:

相关文章:

  • 2021-10-22
  • 2021-08-13
  • 2021-09-28
  • 2019-07-07
  • 2021-10-18
  • 2021-04-18
  • 2021-08-30
  • 2021-08-04
猜你喜欢
  • 2021-09-28
  • 2021-09-28
  • 2021-09-30
  • 2021-10-11
  • 2021-05-21
  • 2021-11-11
  • 2021-11-08
相关资源
相似解决方案