import com.sun.image.codec.jpeg.JPEGCodec不通过 找不到包
2015-12-10 00:00
519 查看
摘要: import com.sun.image.codec.jpeg.JPEGCodec不通过 找不到包
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 ...\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就可以编译通过。
import com.sun.image.codec.jpeg.JPEGCodec不通过 找不到包
在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 ...\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就可以编译通过。
相关文章推荐
- Java图片缩放
- hadoop
- PHP7 PGO小测试
- SSL: error:0B080074:x509 certificate routines:X509
- apache AH01630: client denied by server configura
- Apache2.2和Apache2.4中httpd.conf配置文件的异同
- Either all Options must start with + or -, or no
- Java-----两个日期之间相差天数和相隔天数
- java多线程存钱,取钱例子
- SQLServer子查询
- Exchange2013/2016 DAG高可用性组成员服务器灾难恢复
- Leetcode: Peeking Iterator
- BAYKEE app开发中遇到的一些问题和解决办法
- javascript权威指南学习笔记-函数闭包(十)
- 睡前小dp-poj2096-概率dp
- BestCoder Round #65 HDU 5593 ZYB's Tree (树形DP)
- poj2479 Maximum sum
- Java——用户界面的布局
- 用 Redis 实现分布式锁
- Objective-C 简介