报错:
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的更多相关文章

  1. eclipse错误:Access restriction: The type 'BASE64Decoder' is not API

    Access restriction: The type ‘BASE64Decoder’ is not API (restriction on required library ‘D:\java\jd ...

  2. 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 ...

  3. 怎么在eclipse中查到这个类用的是哪个jar的类和Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案

    找到了一个办法,你先按F3,然后点击Change Attached Source..按钮,在弹出的框里有个路径,我的路径是D:/SNFWorkSpace/JAR/~importu9.jar,然后你去引 ...

  4. 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 ...

  5. 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 ...

  6. mysql error: Access denied for user 'root'@'localhost' (using password: YES)

    昨天重装了下系统,安装好mysql后,安装了客户端工具连接mysql,提示Access denied for user 'root'@'localhost' (using password: YES) ...

  7. 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 阅读 ...

  8. java常见错误--Access restriction: The type BASE64Encoder

    Access restriction: The type BASE64Encoder is not accessible due to restrict 在Eclipse中编写Java代码时,用到了B ...

  9. java加密用到了BASE64Decoder时报错信息:Access restriction: The type BASE64Encoder is not accessible due to restrict

    在Eclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示: Access restriction : ...

随机推荐

  1. hdu3714 三分

    Error Curves Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Tota ...

  2. 搭建lamp环境

    虚拟机始终是虚拟机,还是linux用起来舒服得多.话不多说,回到我们的老本行,linux下进行lamp环境搭建吧. 一.安装 1.Apache sudo apt-get install apache2 ...

  3. php随机获取金山词霸每日一句

    header('Content-Type:text/html; charset=utf-8'); $nowyear=date("Y"); $nowmouth = date('m') ...

  4. 在Win8.1(64位)系统上安装Scrapy(python 2.7.7)

    为了在win8.1上安装scrapy折腾了好久,最终安装成功,总结步骤如下: 下载安装Visual C++ 2008 redistributables 安装lxml-3.2.4.win-amd64-p ...

  5. The Love-Letter Mystery

    def numOperations(testStr): num = 0 n = len(testStr) for i in range(n / 2): num += abs(ord(testStr[i ...

  6. DataTable中数据针对某列数据去重

    //针对这些数据进行去重,取某一列就用这一列字段,把重复的去掉 DataSet ds = dao.get(); DataTable dt = ds.Table[0] DataView dv = dt. ...

  7. filter 以及 orderBy的使用

    filter用于关键字过滤操作,orderBy用于排序操作,运行界面如下: 点击标题Name与Email实现排序功能,输入框中输入关键字进行过滤,同时实现根据关键字进行过滤后进行排序操作: ng-re ...

  8. HDU 3516 Tree Construction (四边形不等式)

    题意:给定一些点(xi,yi)(xj,yj)满足:i<j,xi<xj,yi>yj.用下面的连起来,使得所有边的长度最小? 思路:考虑用区间表示,f[i][j]表示将i到j的点连起来的 ...

  9. C51变量的存储

    一.全局变量和局部变量 全局变量和局部变量的区别在于作用域的不同.此外还有静态全局变量和静态局部变量. 全局变量作用域为全局,在一个源文件中定义,其他的源文件也可以应用.在其他的源文件中使用exter ...

  10. linux下通过yum安装svn及配置

    1.环境centos6.4 2.安装svnyum -y install subversion 3.配置 建立版本库目录mkdir /www/svndata svnserve -d -r /www/sv ...