在项目中用到这两个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. 51nod 1022 石子归并 V2 —— DP四边形不等式优化

    题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1022 1022 石子归并 V2  基准时间限制:1 秒 空间限 ...

  2. LightOJ - 1284 Lights inside 3D Grid —— 期望

    题目链接:https://vjudge.net/problem/LightOJ-1284 1284 - Lights inside 3D Grid    PDF (English) Statistic ...

  3. ActiveMQ之发布、订阅使用

    maven依赖 <dependencies> <dependency> <groupId>org.apache.activemq</groupId> & ...

  4. matlab之结构体数组struct

    以下内容来自于:https://blog.csdn.net/u010999396/article/details/54413615/ 要在MALTAB中实现比较复杂的编程,就不能不用struct类型. ...

  5. PHP5.3之后的新特性【转】

    http://blog.csdn.net/black_ox/article/details/21163193

  6. the art of seo(chapter ten)

    Mobile, Local, and Vertical SEO ***The Mobile Landscape***Mobile site speed:• Google Page Speed Insi ...

  7. C#多线程学习 之 线程池[ThreadPool]

    在多线程的程序中,经常会出现两种情况: 一种情况:   应用程序中,线程把大部分的时间花费在等待状态,等待某个事件发生,然后才能给予响应                   这一般使用ThreadPo ...

  8. 「BZOJ2721」「LuoguP1445」 [Violet]樱花(数论

    题目背景 我很愤怒 题目描述 求方程 $\frac{1}{x}+\frac{1}{y}=\frac{1}{N!}$ 的正整数解的组数,其中$N≤10^6$. 解的组数,应模$1e9+7$. 输入输出格 ...

  9. 洛谷P1525关押罪犯——二分做法

    题目:https://www.luogu.org/problemnew/show/P1525 二分答案,二分图染色判断是否可行. 代码如下: #include<iostream> #inc ...

  10. c# Linq Where 抛出异常 导致 程序崩溃

    Collection was modified; enumeration operation may not execute" 这次项目中遇到一个问题, 就是C#程序随机崩溃, 抛出上面的异 ...