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 ...
随机推荐
- ubuntu源码安装jdk8
最近学习java,想起来没有在Ubuntu上使用过 因此想安装下环境,并在Ubuntu上试用MPXJ读取mpp文件 1.安装 下载jdk8 https://www.oracle.com/technet ...
- python利用opencv合成模糊图像
之前需要评估图像质量来筛选成像质量不错的图片,去除由于对焦,运动等造成的模糊图像,所以在构建数据集的时候考虑用opencv对清晰的图片进行处理获得模糊的图片从而进行训练. 1) 运动模糊图像 一般来说 ...
- FastJSON 设置默认参数,全局配置方式 和 一些使用方式、坑
如果要被序列化的对象含有一个date属性或者多个date属性按照相同的格式序列化日期的话,那我们可以使用下面的语句实现: 在应用的的Main方法体里配置全局参数: JSONObject.DEFFAUL ...
- linux telnet检测与某个端口是否开通
转自:http://blog.51cto.com/meiling/1982402 一:telnet此法常被用来检测是个远端端口是否通畅. 测试域名: # telnet baidu.com 80 Try ...
- deep learning 以及deep learning 常用模型和方法
首先为什么会有Deep learning,我们得到一个结论就是Deep learning需要多层来获得更抽象的特征表达. 1.Deep learning与Neural Network 深度学习是机器学 ...
- 【消灭代办】第4周 - Echarts在移动端的各种填坑姿势
啊呀呀呀呀...... 2018-12-03 代办一:坐标指示器相关问题: 见另一篇 第二问:https://www.cnblogs.com/padding1015/p/9936533.html 20 ...
- express中间件--Morgan 日志记录
Morgan是一个node.js关于http请求的日志中间件 安装模块 npm install morgan --save #保存到package.json的依赖列表1使用方法 在终端打印日志...v ...
- Android学习:代码控制UI界面示例
package allegro.test2; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; im ...
- Centos下普通用户设置sudo权限
若执行sudo命令的用户没有sodu权限,则会报以下错误 violet is not in the sudoers file.This incident will be reported 若想让vio ...
- Bootstrap模态框原理分析及问题解决
最近自学了bootstrap觉得里面模板样式挺好的,就想自己实现实现,不多说了,开始进入正题了 今天就来实现bootstrap里面的模态框弹出效果 首先很简单 实现一个类似于panel的modal 1 ...