eclipse不识别JPEGCodec和JPEGCodec

在使用Eclipse缩放图片时应用到了以下两个包:
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg. JPEGCodec ;
但是导入包报错:
Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library 。。。。
 
 
解决办法:
把Windows-Preferences-Java-Complicer-Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以了。

posted on 2012-09-17 10:02  风也无踪  阅读(421)  评论(0编辑  收藏  举报

导航