Access restriction: The type BASE64Encoder is not accessible due to restrict

2011年11月18日 20:47:06 阅读数:8142 标签: accesslibraryeclipseconstructorjavacompiler更多

个人分类: J2SE
 
在Eclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示: 
Access restriction : The type BASE64Decoder is not accessible due to restriction on required library C:\Program 
files\java\jre6\lib\rt.jar 
Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar 
搞不懂是为什么,最后在http://forums.dzone.com/eclipse/384-access-restriction- problems.html找到答案,只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了。但是我仍然很疑惑是为什么。。。 
原文见:http://zhoushuyan.cn/java/the-type-base64decoder-is-not-accessible-due-to-restriction-on-required-library/ 
------------------------------ 
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> 
Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning

转自:

http://palwang.iteye.com/blog/906425

Access restriction: The type BASE64Encoder is not accessible due to restrict(转载)的更多相关文章

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

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

  2. "Access restriction: The type BASE64Encoder is not accessible due to restrict"问题解决

    问题如题: Eclipse中有一种叫做存取限制的机制,来防止你错误使用那些非共享的API.通常来说,Eclipse做的是对的,因为两点,我们不想要使用非共享API的,而且Eclipse知道什么是共享的 ...

  3. Access restriction: The type TaskTopicResolver is not accessible due to restrict

    Access restriction: The type TaskTopicResolver is not accessible due to restrict :  Eclipse 默认把这些受访问 ...

  4. Access restriction: The type BASE64Encoder is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

    解决方案:在configure build path 中去掉 jre system library,然后重新加载jre system library.....

  5. MyEclipse报错Access restriction: The type BASE64Encoder is not accessible due to restriction on required library

    错误截图: 解决办法: 1.进入Project --> Properties --> Java Build Path --> Libraries 2.remove 掉 JRE Sys ...

  6. 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重新加入. ===== ...

  7. 解决:高版本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 ...

  8. 报错: 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 ...

  9. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar 报错

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

随机推荐

  1. “全栈2019”Java多线程第二十一章:同步代码块产生死锁的例子

    难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java多 ...

  2. jzoj5864

    本來這道題該100的,沒想到考試沒想最短路,直接跑暴力了 實際上這道題有原題跳樓機 那道題在模x的意義下統計答案 現在,我們要統計n個數的答案 30pts為提高組原題 剩下70pts,可以記dis[i ...

  3. C/C++ 语言 Hello world

    #include <stdio.h> void main() { int x,i; ; scanf("%d",&x); if(x>y) printf(&q ...

  4. Android逆向系列文章— Android基础逆向(6)

    本文作者:HAI_ 0×00 前言 不知所以然,请看 Android逆向-Android基础逆向(1) Android逆向-Android基础逆向(2) Android逆向-Android基础逆向(2 ...

  5. 实现一个算法,寻找字符串中出现次数最少的、并且首次出现位置最前的字符 如"cbaacfdeaebb",符合要求的是"f",因为他只出现了一次(次数最少)。并且比其他只出现一次的字符(如"d")首次出现的位置最靠前。

    实现一个算法,寻找字符串中出现次数最少的.并且首次出现位置最前的字符如"cbaacfdeaebb",符合要求的是"f",因为他只出现了一次(次数最少).并且比其 ...

  6. 2. Linear Model

    1. 基本形式 给定由$d$个属性描述的示例 $\textbf{x} =(x_1;x_2;...,x_n)$,其中$x_i$是$x$在第$i$个属性上的取值,线性模型(linear model)试图学 ...

  7. 3. Decision Tree

    1. 算法流程 一般的,一颗决策树包含一个根结点.若干内部结点和若干叶结点:叶节点对应于决策结果,其他每个结点则对应于一个属性测试结果:每个结点包含的样本集合根据属性测试的结果被划分到子结点中:根结点 ...

  8. python操作oracle数据库-查询

    python操作oracle数据库-查询 参照文档 http://www.oracle.com/technetwork/cn/articles/dsl/mastering-oracle-python- ...

  9. 希尔排序的理解和实现(Java)

    希尔排序原理 希尔排序(shell sort)这个排序方法又称为缩小增量排序,是1959年D·L·Shell提出来的. 该方法的基本思想是:设待排序元素序列有n个元素,首先取一个整数increment ...

  10. C语言 for循环次数

    for (i = 0;i < n;i++) 则循环次数是N,而循环结束以后,i的值是n.循环的控制变量i,是选择从0开始还是从1开始,是判断i<n 还是i <= n,对循环的次数,循 ...