在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 
  
我这样解决的!

The constructor BASE64Encoder() is not accessible due to restriction on required的更多相关文章

  1. The constructor BASE64Encoder() is not accessible due to restriction on required library

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

  2. Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library

    1.问题描述 找不到包  sun.misc.BASE64Encoder 2. 解决方案 只需要在project build path中先移除JRE System Library,再添加库JRE Sys ...

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

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

  5. Eclipse 关于“The type * is not accessible due to restriction on required library”问题的解决办法

    The type * is not accessible due to restriction on required library”的错误, 意思是所需要的类库由于受限制无法访问. 解决办法: 1 ...

  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. (Error) The type AESKeyGenerator is not accessible due to restriction on required library.

    error for 'Access restriction: The type AESKeyGenerator is not accessible due to restriction on requ ...

  8. not accessible due to restriction on required library

    The type AWTUtilities is not accessible due to restriction on required library D:\Program Files\jdk1 ...

  9. Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not accessible due to restriction on required library

    异常: Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not access ...

随机推荐

  1. 【转】基于LDA的Topic Model变形

    转载自wentingtu 基于LDA的Topic Model变形最近几年来,随着LDA的产生和发展,涌现出了一批搞Topic Model的牛人.我主要关注了下面这位大牛和他的学生:David M. B ...

  2. iOS 定义圆角控件

    ios7 以前,想把UILabel变为圆角的,只需要设置layer的 cornerRadius属性,ios7以后,还需要设置 masksToBounds = true. 以下是这个属性的说明 A Bo ...

  3. Java for LeetCode 077 Combinations

    Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For exampl ...

  4. windows设置java环境变量

    JAVA_HOME C:\Program Files\java\jdk1.6.0_38 path %JAVA_HOME%\bin; CLASSPATH .;%JAVA_HOME%\lib\dt.jar ...

  5. Andorid中的HAL

    参考文章: http://blog.csdn.net/luoshengyang/article/details/6567257

  6. 注意padding-top 百分比定义基于父元素宽度的百分比上内边距!!是基于宽度

    定义和用法 padding-top 属性设置元素的上内边距(空间). 说明 该属性设置元素上内边距的宽度.行内非替换元素上设置的上内边距不会影响行高计算,因此,如果一个元素既有内边距又有背景,从视觉上 ...

  7. C# Winform ListView使用

    以下内容均来自网上,个人收集整理,具体出处也难确认了,就没写出处了: 一.基本使用: listView.View = View.Details;//设置视图 listView.SmallImageLi ...

  8. Java Hour 58 Java Virtual Machine

    每每谈到Java Virtual Machine, 你必须意识到这个有三种意思: 1 一个抽象的指南 2 一个具体的实现 3 一个运行时的实例 JVM 的生命周期 每个运行时JVM 实例都是为一个特定 ...

  9. etc/profile和/etc/environment的比较

    转自:http://andy136566.iteye.com/blog/1025338 先将export LANG=zh_CN加入/etc/profile ,退出系统重新登录,登录提示显示英文.将/e ...

  10. DHCP和NAT的概念与对比

    转自:http://network.51cto.com/art/201009/223440.htm 在网络协议中,DHCP和NAT的使用非常普遍.那么对于这两个协议你是否有所掌握呢?这里我们针对这两方 ...