"Access restriction: The type BASE64Encoder is not accessible due to restrict"问题解决
问题如题:
Eclipse中有一种叫做存取限制的机制,来防止你错误使用那些非共享的API。通常来说,Eclipse做的是对的,因为两点,我们不想要使用非共享API的,而且Eclipse知道什么是共享的和非共享的API。但是有时我们想要使用非共享的API,比如说用gmail的来发送和接收邮件,要用到SSL。这个就是非共享的API。这时候我们就要更改一些设置了。
有以下两种解决方法:
方法一:
全局属性Project>preferences>java>Compiler>Errors/Warnings>把右侧的【Deprecated and restricted API>Forbidden reference的Error】置为【Warning】.或着【Ignore】.
方法二:
项目属性preferences>java build path>把右侧【libraries中的JRE System Library】删除重新导入.
推荐使用后一种方法。
参考文章:
Access restriction: The type 'Application' is not API (restriction on required library rt.jar)
百度知道:https://zhidao.baidu.com/question/506978967.html
"Access restriction: The type BASE64Encoder is not accessible due to restrict"问题解决的更多相关文章
- Access restriction: The type BASE64Encoder is not accessible due to restrict(转载)
Access restriction: The type BASE64Encoder is not accessible due to restrict 2011年11月18日 20:47:06 阅读 ...
- java加密用到了BASE64Decoder时报错信息:Access restriction: The type BASE64Encoder is not accessible due to restrict
在Eclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示: Access restriction : ...
- Access restriction: The type TaskTopicResolver is not accessible due to restrict
Access restriction: The type TaskTopicResolver is not accessible due to restrict : Eclipse 默认把这些受访问 ...
- 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.....
- 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 ...
- 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重新加入. ===== ...
- 解决:高版本jdk编译低版本代码时eclipse提示Access restriction:The type 'Unsafe' is not accessible due to restriction on required library
在Eclipse中采用高版本jdk编译一些低版本的源码时,由于源码中使用了一些高版本中过时的API,可能就会报错,类似于: Access restriction:The type 'Unsafe' i ...
- 报错: 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 ...
- 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 ...
随机推荐
- gulp4.0 存在的错误信息 The following tasks did not complete: default,Did you forget to signal async completion?
当gulp为如下代码的时候: // 以下代码会执行在node环境下 const gulp = require( "gulp" ); // 创建一个gulp的任务 gulp.task ...
- Split the Number(思维)
You are given an integer x. Your task is to split the number x into exactly n strictly positive inte ...
- OpenFlow协议
功能 1.0版本Openflow:控制器通过Openflow协议与交换机建立了安全通道(Sceure Channel),下发流表. 1.3版本Openflow:多控制器,多流表. 用于实现Contro ...
- lintcode-426-恢复IP地址
426-恢复IP地址 给一个由数字组成的字符串.求出其可能恢复为的所有IP地址. 样例 给出字符串 "25525511135",所有可能的IP地址为: [ "255.25 ...
- C#高级编程 (第六版) 学习 第四章:继承
第四章 继承 1,继承的类型 实现继承: 一个类派生于一个基类型,拥有该基类型所有成员字段和函数. 接口继承 一个类型只继承了函数的签名,没有继承任何实现代码. 2,实现继承 class MyDe ...
- 【Nginx】配置说明
#定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为当前主机的CPU总核心数. worker_processes 8; #全局错误日志定义类型,[ debug ...
- 【C】树
1.子树是不相交的 2.除了根节点,每个节点有且仅有一个父节点 3.一颗n个节点的树有n-1条边 儿子兄弟表示法 满二叉树与完全二叉树 1.满二叉树是除了叶子节点,每一个节点都有两个子节点,并按顺序排 ...
- PHP中普通属性和静态属性
普通属性(实例属性): 实例的单词为:instance 实例,其实也叫做“对象”: 普通(实例)属性,就是一个可以在该类实例化出的对象上使用的属性! 定义形式: class 类名{ var $属性 ...
- hdfs源码分析第二弹
以写文件为例,串联整个流程的源码: FSDataOutputStream out = fs.create(outFile); 1. DistributedFileSystem 继承并实现了FileSy ...
- 【hdu5306】Gorgeous Sequence 线段树区间最值操作
题目描述 给你一个序列,支持三种操作: $0\ x\ y\ t$ :将 $[x,y]$ 内大于 $t$ 的数变为 $t$ :$1\ x\ y$ :求 $[x,y]$ 内所有数的最大值:$2\ x\ y ...