调用CachedRowSetImpl类时,出现如下错误:eclipse
Access restriction: The type CachedRowSetImpl is not accessible due to restriction on required library C:\glassfish3\jdk7\jre\lib\rt.jarui
问题缘由:spa
1.没有rt.jar包,不过这种状况出现的可能性比较小rest
2.eclipse的设置问题(通常都是这个缘由)ip
问题解决:get
(1) 通常方法:要在project build path中先移除JRE System Library,再添加库JRE System Library,以后就能够了。io
(2) 暴力方法:它默认把这些受访问限制的API设成了ERROR,咱们只要把
Windows->Preferences->Java->Complicer->Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就能够编译经过了编译