首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Access >

解决 eclipse 编译异常:Access restriction: The type Resource is not accessible

2012-09-29 
解决 eclipse 编译错误:Access restriction: The type Resource is not accessibleeclipse编译报错:Access

解决 eclipse 编译错误:Access restriction: The type Resource is not accessible

eclipse编译报错:
Access restriction: The type Resource is not accessible due to restriction on required library  D:\Program Files\Java\jre6\lib\rt.jar



解决方法一:
Project -> Properties -> libraries,
先remove掉JRE System Library,然后再Add Library重新加入。问题解决

解决方法二:
Eclipse 默认把这些受访问限制的API设成了ERROR。
只要把Windows-Preferences-Java-Complicer- Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过。


方法一彻底解决  方法二治标不治本 不推荐

热点排行