import com.sun.image.codec.jpeg.JPEGCodec不通过 找不到包
2015-06-11 13:44
260 查看
在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就可以编译通过。
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就可以编译通过。
相关文章推荐
- Android 动态设置TextView drawableLeft的方式
- 如何设置不同组section的的头部高度?tableView heightForHeaderInSection
- 微信 和 支付宝 公众服务号开发者文档
- Yosemite系统怎么录制 iOS8设备屏幕
- vim 文件保存退出 文件相关操作汇总
- Git注意事项
- Android Fragment内嵌Fragment页面不刷新数据问题
- mysql高级查询
- 第六节:事件处理
- JPA 注解
- 微信公众平台分享
- Android快速开发之appBase——(5).BasePresenter的使用
- EasyUI1.11.1 出现错误: TypeError: _2ad is undefined if (_2ad.onClose) {
- 7张图告诉你成功者与失败者的行为差别
- Qt的学习
- JQUERY动态绘制表格,实现动态添加一行,删除一行
- 各大浏览器 CSS3 和 HTML5 兼容速查表
- Flarum 用到的前端 javascript 库
- android在线更新镜像服务器
- 为什么科技巨头们纷纷更换 Logo?