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中处理图片,需要引入两个包:
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
报错:
Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar
此时解决办法:
Eclipse 默认把这些受访问限制的API设成了ERROR。只要把Windows-Preferences-Java-Complicer- Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过
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:\Program Files\Java\jre6\lib\rt.jar 报错
报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...
- 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.....
- 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 ...
- Eclipse 编译错误 Access restriction: The type 'JPEGCodec' is not API (restriction on required library 'C:\Program Files\Java\jre7\lib\rt.jar')
解决方案: Project -> Properties ->Java Build Path -> libraries, 先 remove 掉 JRE ...
- 报错: 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 JPEGImageEncoder is not accessible due to restriction
转: 解决办法:Access restriction: The type JPEGImageEncoder is not accessible due to restriction 2011年11月2 ...
- 解决:高版本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 VerticalTextSpinner is not accessible due to restriction on required library........
查了下竟然是编译器报错,orz了. Access restriction: 访问限制 on required library: 在依赖库(第三方包) 那就简单了,取消限制就好, eclipse的Win ...
- Access restriction: The type QName is not accessible due to restriction on required library
There's another solution that also works. I found it on this forum: Go to the Build Path settings in ...
随机推荐
- 数据库分库分表(sharding)系列【转】
原文地址:http://www.uml.org.cn/sjjm/201211212.asp数据库分库分表(sharding)系列 目录; (一) 拆分实施策略和示例演示 (二) 全局主键生成策略 (三 ...
- VS2015连接Oracle数据库(转)
原文地址:https://xuanwo.org/2016/01/03/vs-oracle-11g 开发环境 宿主机:Win10 + VS2015 + ODP.Net for VS2015虚拟机:Win ...
- Web开发需要关注的技术细节
摘要:在网站发布前,开发者需要关注有许多的技术细节,比如接口设计.用户体验.安全性.Web标准.性能.SEO等,倘若一个疏忽就会影响到整体的体验效果.作为一名Web开发者,哪些技术细节需要考虑呢? [ ...
- Ubuntu的which、whereis、locate和find命令
which 只能寻找执行文件 ,并在PATH变量里面寻找. whereis 从linux文件数据库(/var/lib/slocate/slocate.db)寻找,所以有可能找到刚刚删除,或者没有发现新 ...
- 解决sublime联网失败,点击package control后没有反应
在中国大陆有可能出现这种情况,这是因为国内不支持https访问引起的(再次吐槽万恶的GFW ). 这时只需要"preferences -> package settings -> ...
- Tornado自定义分布式session框架
一.session框架处理请求执行的流程: 1.服务器端生成随机的cookie字符串 2.浏览器发送请求,服务器将cookie返回给浏览器. 3.服务器在生成一个字典.字典的key为cookie,va ...
- 构建CMDB的一些启发
开篇感言: 自从学习python自动化开发以来,一直都是从技术的角度来看待一切.以为技术就是王道.但显然我是一只井底之蛙.其实技术只不过是实现功能的工具而已,仅此而已.后来学习了解CMDB,越来越发现 ...
- JavaScript 严格模式介绍
如我们所知,JavaScript 是一门灵活的语言.其灵活性同样也带来了很多坑,当然也有一些是设计缺陷.比如 一个变量没有声明就赋值,默认是全局变量,如 (function () { a = 3; } ...
- crontab command not found
在服务器上运行 crontab -e编辑定时任务 结果提示 command not found命令找不到,这就说明没安装crontab 由于 完整操作如下: [root@iZ11pvsxisqZ /] ...
- ASP.NET- web.config配置用户出错页
很简单,刚好用到,收藏 RemoteOnly是自定义用户错误,改成On,将所有错误都不让用户看见 每当用户访问错误页面时,会出现不友好的404错误,所以为了防止这种不友好,我们在web.config中 ...