Access restriction: The type 'Unsafe' is not API
错误:Access restriction: The type 'Unsafe' is not API
Eclipse中有一种叫做存取限制的机制,来防止你错误使用那些非共享的API。通常来说,Eclipse做的是对的,因为两点,我们不想要使用非共享API的,而且Eclipse知道什么是共享的和非共享的API。但是有时我们想要使用非共享的API,比如说用gmail的来发送和接收邮件,要用到SSL。这个就是非共享的API。这时候我们就要更改一些设置了。
更改的步骤如下:
window-java-compiler-Error/Warning-Deprecated and Restricted API-Forbidden reference那里,设置成Ignore即可。
参考连接:http://blog.csdn.net/mr_pang/article/details/47361923
---------------------
作者:u010286334
来源:CSDN
原文:https://blog.csdn.net/u010286334/article/details/62041325
版权声明:本文为博主原创文章,转载请附上博文链接!
Access restriction: The type 'Unsafe' is not API的更多相关文章
- 解决:高版本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 'Application' is not API (restriction on required library)
原文链接:http://rxxluowei.iteye.com/blog/671893 今天写第一次写JavaFX的入门程序就GG 遇到了导入API的问题,无奈疯狂地通过网络找解决方案.. 我的问题是 ...
- Access restriction: The type 'BASE64Encoder' is not API
问题的原因好像是这个方法不是安全的,所以不推荐使用,我是在做毕设时要用到的所以就直接用了(毕设要求没有那么严格的要求)
- 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 ...
- Access restriction: The type 'BASE64Decoder' is not API
Access restriction: The type 'BASE64Decoder' is not API (restriction on required library 'C:\Program ...
- exception Access restriction: The type 'BASE64Encoder' is not API
Created by Marydon on 1.情景展示 在eclipse中切换jdk版本后,报错信息为:exception Access restriction: The type 'BASE6 ...
- eclipse报Access restriction: The type 'BASE64Decoder' is not API处理方法
今天从svn更新代码之后,由于代码中使用了BASE64Encoder 更新之后报如下错误: Access restriction: The type ‘BASE64Decoder’ is not A ...
- eclipse错误:Access restriction: The type 'BASE64Decoder' is not API
Access restriction: The type ‘BASE64Decoder’ is not API (restriction on required library ‘D:\java\jd ...
- Access restriction: The type 'JPEGCodec' is not API
问题 今天导入项目时Eclipse报错如下: Access restriction: The type 'JPEGCodec' is not API (restriction on required ...
随机推荐
- 2单一职责原则SRP
一.什么是单一职责原则 单一职责原则(Single Responsibility Principle ): 就一个类而言,应该仅有一个引起它变化的 原因. 二.多功能的山寨手机 山寨手机的功能: 拍照 ...
- css背景图撑开盒子高度
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Mysql命令行tab自动补全方法
在mysql命令行有时为了方便想要按tbl键自动补全命令,以便节约时间. 具体方法如下: 第一步:修改my.cnf vi mysql/etc/my.cnf 将下图红框的代码注释,修改成如下代码: #d ...
- java中的动态代理Proxy
动态代理是java语言的一个神奇的地方,不是很好理解,下面来看看关键的地方. InvocationHandler 是一个接口,官方文档解释说,每个代理的实例都有一个与之关联的 InvocationHa ...
- mobx 添加 isEmpty 装饰器
避免 obj.xxx && obj.xxx.length 这样的写法 store import * as u from "lodash"; function isE ...
- P1115 最大子段和
题目描述 给出一段序列,选出其中连续且非空的一段使得这段和最大. 输入输出格式 输入格式: 第一行是一个正整数NNN,表示了序列的长度. 第二行包含NNN个绝对值不大于100001000010000的 ...
- Request.url请求属性
Request.url请求路径的一些属性1,Request.UrlReferrer.AbsolutePath=获取URL的绝对路径例:"/Manager/Module/OfficialMan ...
- Python学习之旅(三十一)
Python基础知识(30):图形界面(Ⅰ) Python支持多种图形界面的第三方库:Tk.wxWidgets.Qt.GTK等等 Tkinter可以满足基本的GUI程序的要求,此次以用Tkinter为 ...
- mysql数据库数据的 备份以及还原
数据库备份的3种方式: 例如:mysqldump -uzx_root -p test>/root/test1.sql
- 脚本一键部署lnmp
[root@ycj ~]# wget -c http://soft.vpser.net/lnmp/lnmp1.1-full.tar.gz && tar zxf lnmp1.1-full ...