Eclipse error:Access restriction
报错:
Access restriction: The method decodeBuffer(String) from the type CharacterDecoder is not accessible due to restriction on required library
Access restriction: The constructor BASE64Decoder() is not accessible due to restriction on required library
Access restriction: The type BASE64Decoder is not accessible due to restriction on required library
解决方法:
这是eclipse设置问题,eclipse默认把这些受访问限制的API设成了ERROR,只要把
Window-Preferences-Java Complicer-Errors/Warnings
里面的Deprecated and restricted API中的Forbidden references(access rules)设置为Warning即可。
解决方案1(推荐):
只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了。
解决方案2:
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings ->
Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning
Eclipse error:Access restriction的更多相关文章
- eclipse错误:Access restriction: The type 'BASE64Decoder' is not API
Access restriction: The type ‘BASE64Decoder’ is not API (restriction on required library ‘D:\java\jd ...
- Java,AWTUtilities,eclipse报编译错误:Access restriction: The type 'AWTUtilities' is not API (restriction on required library 'C:\Program Files\Java\jre7\lib\rt.jar')
[场景]调用com.sun.awt.AWTUtilities时,eclipse提示编译错误: Access restriction: The type 'AWTUtilities' is not AP ...
- 怎么在eclipse中查到这个类用的是哪个jar的类和Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
找到了一个办法,你先按F3,然后点击Change Attached Source..按钮,在弹出的框里有个路径,我的路径是D:/SNFWorkSpace/JAR/~importu9.jar,然后你去引 ...
- 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 编译错误 Access restriction: The type 'JPEGCodec' is not API (restriction on required library 'C:\Program Files\Java\jre7\lib\rt.jar')
解决方案: Project -> Properties ->Java Build Path -> libraries, 先 remove 掉 JRE ...
- mysql error: Access denied for user 'root'@'localhost' (using password: YES)
昨天重装了下系统,安装好mysql后,安装了客户端工具连接mysql,提示Access denied for user 'root'@'localhost' (using password: YES) ...
- 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常见错误--Access restriction: The type BASE64Encoder
Access restriction: The type BASE64Encoder is not accessible due to restrict 在Eclipse中编写Java代码时,用到了B ...
- java加密用到了BASE64Decoder时报错信息:Access restriction: The type BASE64Encoder is not accessible due to restrict
在Eclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示: Access restriction : ...
随机推荐
- html label 标签的 for 属性
如果您在 label 元素内点击文本,就会触发此控件.就是说,当用户选择该标签时,浏览器就会自动将焦点转到和标签相关的表单控件上. 有两种使用方法: 方法1 使用for属性 <label for ...
- .Net 插入数据MySql数据库,中文乱码解决问题
1, 修改mysql根目录下配置文件my.ini,在[client]节点下添加default-character-set=utf8 ,在[mysqld]节点下添加character_set_serve ...
- 一则 Mysql 建表语句
DROP TABLE IF EXISTS `nuvue`; CREATE TABLE `nuvue`( `id` ) UNSIGNED NOT NULL AUTO_INCREMENT, `status ...
- linux虚拟机网络连接模式 bridged, host-only, NAT
最近安装了fedora9.0,却一直不能连接到外网,我用的是3G无线网卡上网的,起初以为是linux不支持3G无线方式的,可后来装了虚拟机ubuntu却可以上网,在后来用有ADSL网络连接的电脑安装f ...
- [原创]零基础R语言教程---第二课---R语言入门
这节教程简单描述了R语言中常用的数据类型, 向量,字符串,矩阵,列表,数据框,以及附带了一个小例子 对于这节课所附带的例子需要做下列补充: 1.这个例子面向于对整列的数据进行预测 2.如果你需要求单行 ...
- C语言内存调试技巧—C语言最大难点揭秘
本文将带您了解一些良好的和内存相关的编码实践,以将内存错误保持在控制范围内.内存错误是 C 和 C++ 编程的祸根:它们很普遍,认识其严重性已有二十多年,但始终没有彻底解决,它们可能严重影响应用程序, ...
- ORA-07217: sltln: environment variable cannot be evaluated及RMAN-06059
备份脚本: RMAN> run { allocate channel c1 device type disk format '$BACKUP_HOME/level0/level0_%d_%s_% ...
- github在eclipse中的配置
http://www.cnblogs.com/yejiurui/archive/2013/07/29/3223153.html http://blog.csdn.net/shehun1/article ...
- Codeforces 571B Minimization
http://codeforces.com/problemset/problem/571/B 给出一个序列,可以任意调整序列的顺序,使得给出的式子的值最小 思路:我们可以把序列分解,变成k条链,n%k ...
- git push error: RPC failed; result=56, HTTP code = 0 ,the remote end hung up unexpectedly
git push的时候发生标题上面的错误,不知道怎么解决.搜索了下stackoverflow,上面说是http的postBuffer不够导致的. 要运行以下命令: git config --globa ...