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 : ...
随机推荐
- IOS中对于一些控件的抖动效果
这两天在网上看到一个帖子讨论关于有些app 输入账密时候 错误的话会有抖动效果出现,然后自己琢磨了下如何实现,下面上代码!!! 首先 写一个UIView的分类 #import <UIKit/UI ...
- hdu2588 gcd 欧拉函数
GCD Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...
- php正则验证手机号码
protected function checkphone(){ if(preg_match("/^1[34578]\d{9}$/", $phone)){ return false ...
- PHP连接Microsoft SQL Server 2005/2008
PHP自带的MSSQL扩展php_mssql.dll原来是给SQL Server 2000用的,难怪连接不上2008?! -_-!!要使用SQL Server 2005以上版本,就要用到微软为PHP提 ...
- 浅析Javascript原型继承(转)
引自: http://blog.csdn.net/kittyjie/article/details/4380918 原作者解释的浅显易懂,非常不错的JavaScript prototype总结 JS没 ...
- NAS4Free 安装配置(二)系统安装
NAS4Free系统安装 看一看BIOS设置 开机按DEL进BIOS 改日期时间 这里可以设置RAID,因为ZFS的RAID功能更好,所以我们在这里不配置RAID 制作LiveUSB 用软件(USB ...
- BZOJ 1068 (区间DP)
题意:字符串的压缩,f[l][r][0]代表还没M,f[l][r][1]代表有M. #include<cstdio> #include<cmath> #include<c ...
- 一些80C51单片机支持双DPTR,C编译器是如何使用它的?
在C51中,C编译器并不利用双DPTR来优化用户所写的程序,只有一些库例程使用了双数据指针.当在两个存储器块之间进行数据复制或比较时,以下库例程会使用双数据指针: memmovememcpymemcm ...
- 《Programming WPF》翻译 第9章 1.自定义控件基础
原文:<Programming WPF>翻译 第9章 1.自定义控件基础 在写一个自定义控件之前,你需要问的第一个问题是,我真的需要一个自定义控件吗?一个写自定义控件的主要原因是为了用户界 ...
- CPU的物理限制
Quote from Solidot 密歇根大学的Igor Markov在上周的<自然>期刊上发表了一篇文章,谈论了CPU面临的基本物理限制.有学者曾估计预言CPU晶体管数目和性能增长的摩 ...