错误: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的更多相关文章

  1. 解决:高版本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 ...

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

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

  3. Access restriction: The type 'BASE64Encoder' is not API

    问题的原因好像是这个方法不是安全的,所以不推荐使用,我是在做毕设时要用到的所以就直接用了(毕设要求没有那么严格的要求)

  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 'BASE64Decoder' is not API

    Access restriction: The type 'BASE64Decoder' is not API (restriction on required library 'C:\Program ...

  6. exception Access restriction: The type 'BASE64Encoder' is not API

      Created by Marydon on 1.情景展示 在eclipse中切换jdk版本后,报错信息为:exception Access restriction: The type 'BASE6 ...

  7. eclipse报Access restriction: The type 'BASE64Decoder' is not API处理方法

    今天从svn更新代码之后,由于代码中使用了BASE64Encoder  更新之后报如下错误: Access restriction: The type ‘BASE64Decoder’ is not A ...

  8. eclipse错误:Access restriction: The type 'BASE64Decoder' is not API

    Access restriction: The type ‘BASE64Decoder’ is not API (restriction on required library ‘D:\java\jd ...

  9. Access restriction: The type 'JPEGCodec' is not API

    问题 今天导入项目时Eclipse报错如下: Access restriction: The type 'JPEGCodec' is not API (restriction on required ...

随机推荐

  1. 【BZOJ4025】二分图

    Description 神犇有一个n个节点的图.由于神犇是神犇,所以在T时间内一些边会出现后消失.神犇要求出每一时间段内这个图是否是二分图.这么简单的问题神犇当然会做了,于是他想考考你. Input ...

  2. Python连接Mssql

    此篇使用的是Python3.6 下载pymssql包 打开网址http://www.lfd.uci.edu/~gohlke/pythonlibs/ 用pip安装whl文件.在cmd中输入 pip in ...

  3. SpringMVC工作原理 : HandlerMapping和HandlerAdapter

    一.HandlerMapping 作用是根据当前请求的找到对应的 Handler,并将 Handler(执行程序)与一堆 HandlerInterceptor(拦截器)封装到 HandlerExecu ...

  4. Windows 10 如何使用「系统还原」功能备份系统状态和配置

    https://www.sysgeek.cn/windows-10-system-restore/ 在 Windows 10 系统中,「系统还原」功能旨在创建配置快照,并在检测到系统更改时将其工作状态 ...

  5. python __get__ & __set__

    目的:  提供类似java中的getter/setter的东西. (getter/setter的目的: 将属性方法化,使得属性的引用变得简单---尤其将来属性的读取/赋值有比较复杂的逻辑) 官方简明文 ...

  6. cs231n笔记(二) 最优化方法

    回顾上一节中,介绍了图像分类任务中的两个要点: 假设函数.该函数将原始图像像素映射为分类评分值. 损失函数.该函数根据分类评分和训练集图像数据实际分类的一致性,衡量某个具体参数集的质量好坏. 现在介绍 ...

  7. 动态HTMl处理

    后续爬虫代码的建议 尽量减少请求次数 1. 能抓列表页就不抓详情页 2. 保存获取的html页面,供差错和重复请求使用 关注网站的所有类型的页面 1. wap页面,触屏版页面 2. H5页面 3. A ...

  8. Tanya and Candies

    Tanya and Candies time limit per test 1 second memory limit per test 256 megabytes input standard in ...

  9. 通俗bandit算法

    [原文链接] 选择是一个技术活 著名鸡汤学家沃.滋基硕德曾说过:选择比努力重要. 我们会遇到很多选择的场景.上哪个大学,学什么专业,去哪家公司,中午吃什么,等等.这些事情,都让选择困难症的我们头很大. ...

  10. Python学习之旅(二十三)

    Python基础知识(22):进程和线程(Ⅰ) 1.多进程 (1)fork Python的os模块封装了常见的系统调用,其中就包括fork,可以在Python程序中轻松创建子进程 fork可以在Mac ...