在项目中用到这两个Jar包,但是程序报错。

Access restriction: The type BASE64Decoder is not accessible due to restriction on required library C:\Program 
files\java\jre7\lib\rt.jar 
Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre7\lib\rt.jar

解决方法:

右键项目 -> Build Path -> Configure Build Path -> Libraries -> 选中 JRE System Library -> Remove

接着: Add Library -> JRE System Library   重新编译后,就没有问题了。

解决import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder;报错的问题的更多相关文章

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

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

  2. 解决Linux下启动Tomcat遇到Neither the JAVA_HOME ...报错

    解决Linux下启动Tomcat遇到Neither the JAVA_HOME ...报错 Neither the JAVA_HOME nor the JRE_HOME environment var ...

  3. 解决import caffe 时no module named protobuf的报错

    ProtoBuf是Google开发的可以实现内存与非易失存储介质(硬盘文件等等)交换时的协议接口.Caffe源码中大量使用了ProtoBuf作为权值和模型参数的载体. 在Anaconda下打开Anac ...

  4. %@ taglib uri="http://java.sun.com/jsp/jstl/core"prefix="c"%报错

    用eclipse写jsp代码时发现下面两行代码报错:<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix=&qu ...

  5. 吴裕雄--天生自然 JAVA开发学习:解决java.sql.SQLException: The server time zone value报错

    这个异常是时区的错误,因此只你需要设置为你当前系统时区即可,解决方案如下: import java.sql.Connection ; import java.sql.DriverManager ; i ...

  6. 解决spring-boot配置文件使用加密方式保存敏感数据启动报错No decryption for FailsafeTextEncryptor. Did you configure the keystore correctly

    spring-boot配置文件使用加密方式保存敏感数据 application.yml spring: datasource: username: dbuser password: '{cipher} ...

  7. 【问题与解决】Mac OS通过 npm 安装 React Native 报错(checkPermissions Missing write access to /usr/local/lib/node_modules)

    报错情况: 当Mac OS通过 npm 安装 React Native 报错,警告文字为:checkPermissions Missing write access to /usr/local/lib ...

  8. 解决升级Spark2.0之后,DataFrame map操作报错

    当我们在使用spark1.6的时候,当我们创建SQLContext读取一个文件之后,返回DataFrame类型的变量可以直接.map操作,不会报错.但是升级之后会包一个错误,如下: 报错:No imp ...

  9. 【maven】排除maven中jar包依赖的解决过程 例子:spring cloud启动zipkin,报错maven依赖jar包冲突 Class path contains multiple SLF4J bindings.

    一直对于maven中解决jar包依赖问题的解决方法纠结不清: 下面这个例子可以说明一个很简单的解决方法: 项目启动报错: Connected to the target VM, address: '1 ...

随机推荐

  1. Android Wifi简单的梳理【转】

    本文转载自:http://blog.csdn.net/gabbzang/article/details/10005411 代表一个已经配置过的网络.包含网络ID(networkId).该网络ID代表的 ...

  2. ManualResetEvent使用

    1.定义 MSDN定义: 通知一个或多个正在等待的线程已发生事件.此类不能被继承. 详细说明: ManualResetEvent 允许线程通过发信号互相通信.通常,此通信涉及一个线程在其他线程进行之前 ...

  3. ubuntn14.04 使用 nvm创建多版本node环境

    1. 下载 nvm wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash 2. 然后 ...

  4. python注释行与段落

    注释行:# 注释段:‘’‘   ’‘’

  5. matlab之细胞数组

    学习matlab的一个博客:https://blog.csdn.net/smf0504/article/details/51814362 Matlab从5.0版开始引入了一种新的数据类型—细胞( ce ...

  6. COM中[int],[out],[out,retval]的含义

    COM中在声明函数中通常会这样: HRESULT getName([in]int ID,[out,retval]*BSTR name) 实现函数时,这样: STDMETHODIMP Person::g ...

  7. OpenCV——Skewing

    // define head function #ifndef PS_ALGORITHM_H_INCLUDED #define PS_ALGORITHM_H_INCLUDED #include < ...

  8. bzoj 4066: 简单题 K-D树

    题目大意: http://www.lydsy.com/JudgeOnline/problem.php?id=4066 题解 我们把每次的修改操作都当作二维平面上多了一个权值点 对于每组询问可以看做求一 ...

  9. 【LeetCode】042 Trapping Rain Water

    题目: Given n non-negative integers representing an elevation map where the width of each bar is 1, co ...

  10. jdk、tomcat如何配置环境变量

    一.安装JDK和Tomcat 1,安装JDK:直接运行jdk-7-windows-i586.exe可执行程序,默认安装即可. 备注:路径可以其他盘符,不建议路径包含中文名及特殊符号. 2.安装Tomc ...