Eclipse Access Restriction
来源:互联网 发布:工业建模软件 编辑:程序博客网 时间:2024/06/11 09:06
Question:
Access restriction: the type * is not accessible due to restriction on required library *.jar
Access restriction:The method * is not accessible due to restriction on required library *.jar
Description:
Eclipse环境下,项目中导入某些JAR,使用这些JAR中的某些API。结果出现Access restriction错误,如下图:
Accuse:
Access restriction的原因是因为这些JAR默认包含了一系列的代码访问规则(Access Rules),如果代码中引用了这些访问规则所禁止引用类,那么就会提示这个错误信息。
Action:
一、既然存在访问规则,那么修改访问规则即可。打开项目的Build Path Configuration页面,打开报错的JAR包,选中Access rules条目,选择右侧的编辑按钮,添加一个访问规则即可。
二、网上的另外一种解决方案:Window - preference - Java - Compiler - Errors/Warnings界面的Deprecated and restricted API下。把Forbidden reference (access rules): 的规则由默认的Error改为Warning。
这种方案是修改整个Eclipse开发环境,将所有禁止访问的引用由原来的Error(默认)修改为Warning。这种规避方式比较粗暴,个人支持第一种方案。
原文地址:http://hi.baidu.com/oritenson/blog/item/9b6c072a90a1dce199250a8e.html
- Eclipse Access restriction
- Eclipse Access Restriction
- Eclipse Access Restriction
- eclipse:Access restriction Error
- 【Eclipse】Access restriction:
- **Eclipse Access Restriction**
- 解决Eclipse Access restriction: 问题
- 解决Eclipse Access restriction: 问题
- Eclipse中的Access restriction错误
- Eclipse错误提示:Access restriction
- 解决Eclipse Access restriction问题
- 解决Eclipse Access restriction 的问题
- 解决eclipse里面的Access restriction错误
- eclipse Access restriction required library rt.jar
- 【问题收录】Eclipse Type Access restriction问题解决
- Access restriction
- Access restriction
- Access restriction
- ARM指令中如何判断一个立即数是有效立即数
- 前言
- extjs itemselector 使用详解,前台显示及后台数据交互
- 让织梦主页可以调用副栏目(副标题为9个之内)
- SUMMARY OF CHAPTER 3-4
- Eclipse Access Restriction
- windows下,安装python的chardet办法
- 很有意思的弹性格
- 【程序员一枚】Qt网络开发之QNetworkAccessManager的使用
- Linux中Kill进程的N种方法
- Android文件操作
- 出现 The processing instruction target matching "[xX][mM][lL]" is not allowed错误
- ThinkPHP文件上传类的使用
- Android中BroadcastReceiver的介绍