Access restriction: The type BASE64Decoder is not accessible due to restriction on required library D:\java\jre1.5.0_08\lib\rt.jar

在网上找到了解决方法如下,我是用第二种方法解决的~~ 
Solution 1 :

import=”sun.misc.BASE64Decoder” 
出现错误提示为:Access restriction: The type BASE64Decoder is not accessible due to restriction 
on required library D:\ProgramFiles\MyEclipse\jre\lib\rt.jar 
Solution 1 : 
BASE64Decoder 
这个没有java doc,属于jdk里不推荐使用的工具类 
解决方案: 
使用apache common中的Base64替换 
你可以在这里下载Apache commons codec: 
http://commons.apache.org/codec/ 
替换一下就可以了 
强烈建议不要用sun.misc,是不安全的 ,最好不要使用

Solution 2: 
1. Open project properties. 
2. Select Java Build Path node. 
3. Select Libraries tab. 
4. Remove JRE System Library. 
5. Add Library JRE System Library.

使用sun.misc.BASE64Decoder出错解决方案的更多相关文章

  1. sun.misc.BASE64Decoder 限制取消

    sun.misc.BASE64Decoder Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -&g ...

  2. eclipse 中 import sun.misc.BASE64Decoder; 报错

    from://http://blog.sina.com.cn/s/blog_48964b120101ahrf.html 在android做3DES加密功能时 eclipse 中 import sun. ...

  3. sun.misc.BASE64Decoder的风险

    问题描述 最近需要使用Base64上传图片,但是返现sun.misc.BASE64Decoder 为已经过期的包,此包为以前sun公司的内部包,可以下载此包,但是不利于现在Maven方式构建,可能会在 ...

  4. sun.misc.BASE64Decoder导入异常及处理思路

    Java后台保存base64图片数据 使用byte[] bytes = new BASE64Decoder().decodeBuffer(str);需要引入sun.misc.BASE64Decoder ...

  5. 解决报错:import sun.misc.BASE64Decoder无法找到

    解决报错:import sun.misc.BASE64Decoder无法找到 2017年09月29日 16:03:26 chaoyu168 阅读数:2116 标签: sun.misc.BASE64De ...

  6. JDK从1.8升级到9.0.1后sun.misc.BASE64Decoder和sun.misc.BASE64Encoder不可用

    目录 描述 原因分析 处理办法 参考 描述 最近研究把项目的JDK升级从1.8升级到9.0.1,在eclipse上配置好JDK为9后,发现项目有错,查看发现sun.misc.BASE64Decoder ...

  7. sun.misc.BASE64Decoder 替代

    加密解密经常用到sun.misc.BASE64Decoder处理,编译时会提示: sun.misc.BASE64Decoder是内部专用 API, 可能会在未来发行版中删除 解决办法: Java8以后 ...

  8. Ant 警告:sun.misc.BASE64Decoder 是 Sun 的专用 API,可能会在未来版本中删除

    如果你用Ant编译项目,而且在项目中用了SUN的专用API,你会得到警告信息,然后Ant会报告编译失败: 这当然是不合理的,javac只是警告而已,ant凭什么就直接报失败呢? 其实最好的解决办法是避 ...

  9. 解决import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder;报错的问题

    在项目中用到这两个Jar包,但是程序报错. Access restriction: The type BASE64Decoder is not accessible due to restrictio ...

随机推荐

  1. Oracle常用sql语句。

    最近工作中遇到了一些与oracle相关的问题,稍微整理一些工作中用到的SQL语句 时间相关 --查询距当前时间十分钟内的数据 select sysdate -interval '10' minute ...

  2. CentOS7.5搭建ELK6.2.4集群及插件安装

    一 简介 Elasticsearch是一个高度可扩展的开源全文搜索和分析引擎.它允许您快速,近实时地存储,搜索和分析大量数据.它通常用作支持具有复杂搜索功能和需求的应用程序的底层引擎/技术. 下载地址 ...

  3. ansible安装过程遇到的问题

    1.出现Error: ansible requires a json module, none found! SSH password: 192.168.24.15 | FAILED >> ...

  4. 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:fhcq-oa' did not find a matching property.

    当你在使用Eclipse运行web项目时,你可能会看到控制台出现: 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Settin ...

  5. bzoj 1271

    思路:因为被占奇数次的点只有一个, 那么我们可以将数轴分成两部分,奇数次点之前的前缀和为偶数,之后的前缀和为奇数, 然后就可以二分了. #include<bits/stdc++.h> #d ...

  6. phpstorm 输入法中文不同步 phpstorm 输入法不跟随光标解决办法

    win7系统新安装的phpstorm2017.2版本,试了很多输入法,要么是不显示候选次,要么是输入法候选词总是在屏幕右下角,没有跟随光标移动.百度很久,重要找到解决方案. 就是替换phpstorm安 ...

  7. poj2524 Ubiquitous Religions(并查集)

    题目链接 http://poj.org/problem?id=2524 题意 有n个学生,编号1~n,每个学生最多有1个宗教信仰,输入m组数据,每组数据包含a.b,表示同学a和同学b有相同的信仰,求在 ...

  8. Mysql Window 下安装

    http://blog.csdn.net/u013235478/article/details/50623693

  9. awk 提取列

    awk '{OFS="";print(substr($0,1,6),substr($0,74,18),substr($0,15,3),substr($0,18,8))}' inpu ...

  10. quote函数什么意思,怎么用

    转自: https://blog.csdn.net/qiqiyingse/article/details/70046543 quote函数 属于urllib库里面的一个函数 屏蔽特殊的字符.比如如果u ...