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删除重新导入.
随机推荐
- IT 界那些朗朗上口的“名言”
中国有很多古代警世名言,朗朗上口,凝聚了很多故事与哲理.硅谷的互联网公司里头也有一些这样的名言,凝聚了很多公司价值观和做事的方法,对于很多程序员来说,其影响潜移默化! Stay hungry Stay ...
- 关于阿里云OSS上传图片之后会被旋转90度的解决办法
原文:https://www.cnblogs.com/wuhjbk/p/10133596.html 问题描述:正常的图片前端上传到oss成功之后的资源地址.在html上引用的时候被旋转了90度oss资 ...
- ArcGIS10.6 通过ArcMap发布二维数据服务。
ArcGIS版本基本每年都会更新,原来一直用10.2,在ArcMap中发布服务: 最近安装10.6整套系统,发现在ArcMap中输入http:id:6080/arcgis 输入用户名,密码 无法登录 ...
- Mybatis 动态SQL注解 in操作符的用法
在SQL语法中如果我们想使用in的话直接可以像如下一样使用: ,,) ; ,,) ; 但是如果在MyBatis中的使用 in 操作符,像下面这样写的话,肯定会报错: @Update("upd ...
- JS基本数据类型和引用数据类型区别
1.栈(stack)和堆(heap) stack为自动分配的内存空间,它由系统自动释放:而heap则是动态分配的内存,大小也不一定会自动释放 2.数据类型 JS分两种数据类型: 基本数据类型:Numb ...
- 第92题:反转链表II
一. 问题描述 反转从位置 m 到 n 的链表.请使用一趟扫描完成反转. 说明: 1 ≤ m ≤ n ≤ 链表长度. 示例: 输入: 1->2->3->4->5->NUL ...
- 关于EMF中从schema到ecore转变中的默认处理问题
以前的工作,建模基本都是通过ecore tool直接画ecore的模型图来完成,最近要从schema创建ecore文件,本来以为是非常简单的一件事情,使用向导创建genmodel,然后从xsd文件导入 ...
- VSCode:使用GIT
准备:安装GIT.安装VSCode.GitHub上添加 1.初始化 新建本地文件xmai # 全局配置加上命令--global ,如果只想在本文件夹则去掉此参数即可: > git init &g ...
- junit3和junit4的使用区别如下
junit3和junit4的使用区别如下1.在JUnit3中需要继承TestCase类,但在JUnit4中已经不需要继承TestCase2.在JUnit3中需要覆盖TestCase中的setUp和te ...
- 51nod 1060
反素数定义:对于任意正整数 $n$, 其约数个数记为 $f(n)$, 如果某个正整数 $n$ 满足 对于任意正整数 $i, (0 < i < n)$, 都有 $f(i) < f(n) ...