Access restriction: The type JPEGImageEncoder is not accessible due to restriction
转:
解决办法:Access restriction: The type JPEGImageEncoder is not accessible due to restriction
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 JPEGImageEncoder is not accessible due to restriction的更多相关文章
- 报错: 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 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重新加入. ===== ...
- 解决:高版本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 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 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 ...
- 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.....
- Access restriction: The type Resource is not accessible due to restriction on required library
方法一: 全局属性Project>preferences>java>Compiler>Errors/Warnings>把右侧的[Deprecated and restri ...
- Access restriction: The type Base64 is not accessible due to restriction on
java build path>把libraries中的JRE System Library删除重新导入.
随机推荐
- Linux命令——gzip、zcat、bzip2、bzcat、tar
参考:Linux命令——ar 为什么文件要压缩? 当文件过大时,无论是本地做备份,复制都很麻烦,而且还浪费磁盘空间.如果用网络传输,大文件无疑会浪费大量宝贵带宽.文件压缩技术可以有效解决这个问题,但是 ...
- C#中两个List<TModel>中根据指定条件--判断并获取不同数据的数据集合2
方式一:Linq List<Test> list = new List<Test>(); list.Add(new Test { score = 10, name = &quo ...
- 8.vue-resource 数据请求基本实现
1.vue-resource 实现 get, post, jsonp请求:https://github.com/pagekit/vue-resource 注意: 除了 vue-resource 实现数 ...
- IIS 自动化发布工具实现-Manager【二】
思路: 1.首先是要获取项目的差异文件列表,实现方式是通过cmd 执行git 命令. git pull 拉取最新代码 git log 查看git签入记录 ,使用参数 --pretty=for ...
- 最近公共祖先算法LCA笔记(树上倍增法)
Update: 2019.7.15更新 万分感谢[宁信]大佬,认认真真地审核了本文章,指出了超过五处错误捂脸,太尴尬了. 万分感谢[宁信]大佬,认认真真地审核了本文章,指出了超过五处错误捂脸,太尴尬了 ...
- hive动态分区常用参数
set mapreduce.job.queuename=root.sc;set hive.exec.dynamic.partition=true;set hive.exec.dynamic.parti ...
- java之spring
Spring Spring中的基本概念1.IOC/DI对象的属性由自己创建,为正向流程,而由Spring创建,为控制反转.DI(依赖注入)为实现IOC的一种方式,通过配置文件或注解包含的依赖关系创建与 ...
- 如何让DEV跳出的“提示试用版”的对话框不再显示
在 使用DevExpress控件的时候.每次对窗体进行更改的时候,都会出现一个对话框.发布的时候 也会出现一个对话框.之前的解决方法是在发布的时候把licenses.licx给删除掉,但是这个方法治标 ...
- Spring Bean装配(上)
Bean:在spring的IOC里面,把配置到IOC容器里面的实体或者是对象都称为Bean Bean配置项 Bean的作用域 Bean的生命周期 Bean的自动装配 Resources&Res ...
- CSS实现宽度自适应100%,宽高16:9的比例的圖片或者矩形
前言 图片的大小是多少,宽度一定,高度要始终自自适应为16:9. 解决 1通过js,程序算出绝对高度再进行设置.这是解决问题最容易想到的方法. 2.我们的原则是能用css实现的功能尽量用css,这有利 ...