您的位置:首页 > 产品设计 > UI/UE

Access restriction: The type BASE64Decoder is not accessible due to restriction on required library

2016-02-25 16:30 543 查看


Access restriction: The type BASE64Decoder is not accessible due to restriction on required
library

2014-06-12 10:20 581人阅读 评论(0) 收藏 举报


 分类:
 

eclipse(22) 


我们平时看项目的时候,会遇到一些项目中引用了如下亮哥包,它们是 jdk 自带的一些工具类,但是问题是编译器总是报错,这个时候我们可以修改 Eclipse 对于此类问题的提示级别:

import sun.misc.BASE64Decoder;

import sun.misc.BASE64Encoder;

 

调试一个JAVA程序,Eclipse下报错:

The method encode(byte[]) from the type CharacterEncoder is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_21\jre\lib\rt.jar

其实要解决它也很容易,在Window -preferences - Java - Compiler - Errors/Warnings界面的Deprecated and restricted API下。把Forbidden reference (access rules): 的规则由默认的Error改为Warning即可。

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: