access restriction
一、既然存在访问规则,那么修改访问规则即可。打开项目的Build Path Configuration页面,打开报错的JAR包,选中Access rules条目,选择右侧的编辑按钮,添加一个访问规则即可。
二、网上的另外一种解决方案:Window - preference - Java - Compiler - Errors/Warnings界面的Deprecated and restricted API下。把Forbidden reference (access rules): 的规则由默认的Error改为Warning。
如我碰到的是不能访问o.e.j.http.ssl.SslContextFactory, 但是它是继承了jetty-util里的类,而jetty-util的access-rule没有导出这个包,添加:
org/eclipse/jetty/util/ssl/*
后来有看了下,原来的SslContextFactory用的是7.5.1的jetty-http里来的,升级到8.1.16后,它已被弃用,而manifest.xml里的import packages里还是导入的jetty-http-ssl而不是jetty-util-ssl,access rule就是根据这个来的,所以把代码改成使用jetty-util中的类而不是已经弃用的jetty-http中的类,修复import packages就好了.
access restriction的更多相关文章
- 关于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 TaskTopicResolver is not accessible due to restrict
Access restriction: The type TaskTopicResolver is not accessible due to restrict : Eclipse 默认把这些受访问 ...
- Access restriction错误解决办法
Access restriction错误, XX方法 is not accessible due to restriction on required library XXlib 解决方案: Ecli ...
- Access restriction: The type 'BASE64Encoder' is not API
问题的原因好像是这个方法不是安全的,所以不推荐使用,我是在做毕设时要用到的所以就直接用了(毕设要求没有那么严格的要求)
- Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
报错: 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
解决方法: Project -> Properties -> libraries, 先remove掉JRE System Library,然后再Add Library重新加入. ===== ...
- Eclipse error:Access restriction
报错:Access restriction: The method decodeBuffer(String) from the type CharacterDecoder is not accessi ...
- Access restriction: The type VerticalTextSpinner is not accessible due to restriction on required library........
查了下竟然是编译器报错,orz了. Access restriction: 访问限制 on required library: 在依赖库(第三方包) 那就简单了,取消限制就好, eclipse的Win ...
- Java: How to resolve Access Restriction error
Issue: Access restriction: The constructor 'BASE64Decoder()' is not API (restriction on required lib ...
- Access restriction: The type 'BASE64Encoder'
Access restriction: The type 'BASE64Encoder' is not API (restriction on required library 'D:\Java\jd ...
随机推荐
- perl Socket接收超时设置
一般来说, IO::Socket::INET里的Timeout设置是对于conncet的 如果你想设置recv接收超时, 可以这样设置: usr Socket: ...... , )); #注意这里p ...
- html5实现滚动文字
<div class="custom-notice"> <i class="icon-notice"></i> <ma ...
- Android:OpenFire 相关API (持续更新)
基于XMPP协议的聊天服务器.最近会一直更新相关的API. 需要的软件:OpenFire(服务器),Spark(客户端--测试用),Asmack(Jar包) 1.连接服务器的代码 private vo ...
- centos7.2自带的php5.4升级为5.6
参考:http://jingyan.baidu.com/article/380abd0a1f176c1d91192c4b.html 今天在新购的阿里云上部署个phpmyadmin,结果显示了个如下信息 ...
- VBS基础篇 - 循环语句(4) - For Each...Next
VBS基础篇 - 循环语句(4) - For Each...Next For Each...Next 循环与 For...Next 循环类似.For Each...Next 不是将语句运行指定的次 ...
- hdu_1403_Longest Common Substring(后缀数组的应用)
题目链接:hdu_1403_Longest Common Substring 题意: 给你两个字符串,然你找最长的公共子串 题解: 后缀数组的经典应用,要找两个字符串的公共子串,那么就相当于找两个串的 ...
- 期刊:DOI :10.3969/j.issn.1001-2400.2012.01.008
DOI:10.3969/j.issn.1001-2400.2012.01.008 “/” 分为前缀和后缀两部分中间用一斜杠分开,前缀中又以小圆点分为两部分. "DOI":一篇期刊论 ...
- Mac 下格式化U盘
diskutil list 查看U盘盘符: lapommedeMacBook-Pro:~ lapomme$ diskutil list /dev/disk0 (internal, physical): ...
- flashbuilder mx组件 MenuBar
来源:http://www.cuplayer.com/player/PlayerCode/Flex/2013/0118661.html <fx:Script> <![CDATA[ i ...
- 图片应该放在drawable-hdpi下不要放在drawable下
图片应该放在drawable-hdpi下或者mipmap-hdpi 不要放在drawable下,要不然显示有些不同