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就可以了。
 
                    
                     
                    
                 
                    
                 
                
            
         
         
 浙公网安备 33010602011771号
浙公网安备 33010602011771号