Access restriction: The type * is not accessible due to restrict,报错问题
解决方案1:
Eclipse 默认把这些受访问限制的API设成了ERROR。
Windows -> Preferences -> Java
-> Compiler -> Errors/Warnings
->
Deprecated and trstricted API -> Forbidden reference
(access rules): -> change to
warning
解决方案2:
只需要在project build path中先移除JRE System Library,再添加库JRE System
Library,重新编译后就一切正常了。
解决方案3:
工程上右键->工程属性->java builder
path->Libraries标签,点击JRE System Library里面的Access
rules,add sun/** 为accessible,如果该项存在,就edit。
解决方案4:
Windows -> Preferences -> Java
-> Installed JREs -> 选择用的JDK
-> Edit -> Add External
JARs
Access restriction: The type * is not accessible due to restrict,报错问题的更多相关文章
- [转]解决Access restriction: The type * is not accessible due to restrict
我在eclipse使用org.omg下的东西的时候报此错误 我用的第一种方法解决了问题 转自:http://blog.sina.com.cn/s/blog_6714fba70100x6mz.html ...
- Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...
- 怎么在eclipse中查到这个类用的是哪个jar的类和Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
找到了一个办法,你先按F3,然后点击Change Attached Source..按钮,在弹出的框里有个路径,我的路径是D:/SNFWorkSpace/JAR/~importu9.jar,然后你去引 ...
- Access restriction: The type TaskTopicResolver is not accessible due to restrict
Access restriction: The type TaskTopicResolver is not accessible due to restrict : Eclipse 默认把这些受访问 ...
- Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar
解决方法: Project -> Properties -> libraries, 先remove掉JRE System Library,然后再Add Library重新加入. ===== ...
- Access restriction: The type BASE64Encoder is not accessible due to restrict(转载)
Access restriction: The type BASE64Encoder is not accessible due to restrict 2011年11月18日 20:47:06 阅读 ...
- java加密用到了BASE64Decoder时报错信息:Access restriction: The type BASE64Encoder is not accessible due to restrict
在Eclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示: Access restriction : ...
- 解决:高版本jdk编译低版本代码时eclipse提示Access restriction:The type 'Unsafe' is not accessible due to restriction on required library
在Eclipse中采用高版本jdk编译一些低版本的源码时,由于源码中使用了一些高版本中过时的API,可能就会报错,类似于: Access restriction:The type 'Unsafe' i ...
- 报错: Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library
报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...
随机推荐
- 你好,C++(20).4.2.2 表达并列条件选择的switch语句:如果……如果……如果……
4.2.2 表达并列条件选择的switch语句:如果……如果……如果…… 在现实世界中,还有这样一类特殊的条件选择: 如果明天是晴天,我就穿T恤: 如果明天是阴天,我就穿衬衣: 如果明天是雨天,我就 ...
- c++回调实现
回调是A将一个函数指针传给B,然后调用B,B在执行自身函数后,再在合适的时候执行A的这个函数指针,这样就能避免A和B的相互包含和链接,在大型项目中回调是一种打破循环依赖的常用技术. typedef v ...
- em与px的区别 [ 转 ]
其实,还是不大理解,为什么1em=16px:而且,还一般要在body里面,就写清楚Fone-size=62.5%,然后再让1em=10px进行使用:那么,为什么不直接在当时定义em的时候,就直接让它等 ...
- jquery 点点滴滴小记
字符截取显示 var text = $(".content").text(); var textNum = text.length; var textInt = text.slic ...
- php 中PHP_EOL使用
一个小小的换行,其实在不同的平台有着不同的实现,为什么要这样,可以是世界是多样的.本来在unix世界换行就用/n来代替,但是windows为了体现他的不同,就用/r/n,更有意思的是在mac中用/r. ...
- webapi 上传图片
需求:上传学员信息时同时上传头像信息,学员基本信息表和科目表为一对多关系表(添加基本信息后添加通过科目信息). 测试: [HttpPost] public string Post() { if ( ...
- 布局共享(列如所有activity拥有相同的布局部分,比如actionbar,在BaseActivity中写入布局)
有时候界面上会用到统一的布局,比如toolbar,你可能会想到在用到的地方都去加上toobar这样对于程序的开发与维护来说都显得特别麻烦,我们可以将他写在父类中. 首先创建一个BaseActivity ...
- chord原理的解读
chord: A Scalable Peer-to-peer Lookup Service for Internet Application 在 P2P 系统中,有效地定位分布在网络中不同节点的数据资 ...
- 局域网架个YUM源-HTTP的
在安装CDH时,这是个绕不过去的坎. 参考URL: http://www.21ops.com/linux/26465.html 奇怪的是,我并没执行creatrepo这个,直接将光盘MOUNT来用的. ...
- LeetCode_Minimum Path Sum
iven a m x n grid filled with non-negative numbers, find a path from top left to bottom right which ...