在JAVA项目开发中,使用到了BASE64Decoder,但编辑运行时却会出现以下错误:Access restriction required library rt.jar,这里就详细的说明一下如何解决这个问题。

 

方法/步骤

 
  1.  

    双击桌面上的Eclipse快捷方式启动Eclipse。

  2.  

    Eclipse启动中。

  3.  

    选中出错的项目,点击项目菜单》属性

  4.  

    点击左侧的“JAVA Build Path”。

  5.  

    切换到“Libraries”标签,选中“Access rules”,点击“Edit”。

  6.  

    点击“Add”按钮。

  7.  

    Resolution选择Accessible,Rules Pattern输入“**”,点击OK。

  8.  

    成功添加一条规则,点击OK。

  9.  

    这时你会发现Access rules的值已经改变,点击OK问题就解决啦。

    END
 

Access restriction required library rt.jar的更多相关文章

  1. Maven报错Archive for required library:某.jar' in project '项目名'

    Maven报错Archive for required library:某.jar' in project '项目名'cannot be read or is not a valid ZIP file ...

  2. "Access restriction: The type BASE64Encoder is not accessible due to restrict"问题解决

    问题如题: Eclipse中有一种叫做存取限制的机制,来防止你错误使用那些非共享的API.通常来说,Eclipse做的是对的,因为两点,我们不想要使用非共享API的,而且Eclipse知道什么是共享的 ...

  3. 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重新加入. ===== ...

  4. Java,AWTUtilities,eclipse报编译错误:Access restriction: The type 'AWTUtilities' is not API (restriction on required library 'C:\Program Files\Java\jre7\lib\rt.jar')

    [场景]调用com.sun.awt.AWTUtilities时,eclipse提示编译错误: Access restriction: The type 'AWTUtilities' is not AP ...

  5. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar 报错

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  6. Eclipse报错 due to restriction on required library C:/Java/jdk1.7.51/jre/lib/rt.jar 解决方案

    Eclipse报错 due to restriction on required library C:/Java/jdk1.6.0_10/jre/lib/rt.jar 解决方案 Eclipse 编译时 ...

  7. 报错: Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  8. 关于Access restriction: The type 'Application' is not API (restriction on required library)

    原文链接:http://rxxluowei.iteye.com/blog/671893 今天写第一次写JavaFX的入门程序就GG 遇到了导入API的问题,无奈疯狂地通过网络找解决方案.. 我的问题是 ...

  9. Access restriction: The type VerticalTextSpinner is not accessible due to restriction on required library........

    查了下竟然是编译器报错,orz了. Access restriction: 访问限制 on required library: 在依赖库(第三方包) 那就简单了,取消限制就好, eclipse的Win ...

随机推荐

  1. LAMP环境搭建问题

    //////////////////////////LAMP环境搭建问题///////////////////////////////////////LAMP常见的问题A.安装相关问题(1)MySQL ...

  2. Unity3d 异常与解决方案集合(持续)

    1:更新完unity的5.3.1 版本 后,打开SimpleFrameworld_UGUI 后出现 error CS0117: 'System.IO.Directory' does not conta ...

  3. DH02-策略模式

    模式简介 面向对象的编程,并不是类越多越好,类的划分是为了封装,但分类的基础是抽象,具有相同属性和功能的对象的抽象集合才是类. 策略模式(Strategy)定义了算法家族,分别封装起来,让他们相互间可 ...

  4. 测试通过!为何线上还有很多BUG?

    质量控制 大多数测试人员认为测试工作是发现bug,虽然这是测试的主要任务,但其实测试最重要的任务是质量控制,而发现bug和验证bug只是质量控制的一个重要环节而已. 我想很多测试人员都经历过这样的场景 ...

  5. 如何实现vue-cli搭建的前端项目的自动打包

    实现vue-cli + webpack +vue项目的自动打包: 后台java代码: public class OpenDirectory { public static void main(Stri ...

  6. python--基本代码规范

    python代码规范:一.标识符 所谓的标识符就是对变量.常量.函数.类等对象起的名字 python语言在任何场景都严格区分大小写!!! python对于标识符的命名有如下规定: 第一个字符必须是字母 ...

  7. 7.MySQL优化---存储过程和存储函数

    转自互联网. 当一个大型系统在建立时,会发现,很多的SQL操作是有重叠的,个别计算是相同的,比如:业务系统中,计算一张工单的计算方式.当遇到这些情况时,我们运用存储过程就是一个非常棒的优化啦.那么,什 ...

  8. jmeter请求中上传图片

    1.请求中上传图片 把图片放在bin目录下:multipart/form-data 先把照片发送给阿里,阿里返回image_id:然后用后置条件正则表达式匹配并保存image_id 下次请求直接用im ...

  9. C++中关于strtok()函数的用法

    strtok: #include <string.h> char *strtok(char *str, const char *delim); char *strtok_r(char *s ...

  10. mysql出现mysql server has gone away错误的解决办法

    应用程序(比如PHP)长时间的执行批量的MYSQL语句.执行一个SQL,但SQL语句过大或者语句中含有BLOB或者longblob字段.比如,图片数据的处理.都容易引起MySQLserver has ...