首页 > 数据库技术 > 详细

Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access

时间:2015-08-21 21:37:18      阅读:316      评论:0      收藏:0      [点我收藏+]
准备使用Java进行图片压缩的时候,使用
import com.sun.image.codec.jpeg.*;  

结果出现错误:

Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not accessible due to restriction on required library
上网查了一下,发现是IDE的设置问题,它默认把这些受访问限制的API设成了ERROR

解决方法:

Windows->Preferences->Java->Complicer->Errors/Warnings
技术分享
将 Deprecated and restricted API 中的 Forbidden references(access rules) 选为Warning就可以了。

版权声明:本文为博主原创文章,未经博主允许不得转载。

Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access

原文:http://blog.csdn.net/liuruiqun/article/details/47838903

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!