星空网 > 软件开发 > Java

import com.sun.image.codec.jpeg.JPEGCodec不通过 找不到包

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 C:\Java\jre1.6.0_07\lib\rt.jar


此时解决办法:
Eclipse默认把这些受访问限制的API设成了ERROR。只要把Windows-Preferences-Java-Compiler-Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过。






原标题:import com.sun.image.codec.jpeg.JPEGCodec不通过 找不到包

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

如何fba发货:https://www.goluckyvip.com/tag/40184.html
如何把外贸做起来:https://www.goluckyvip.com/tag/40185.html
如何参加广交会:https://www.goluckyvip.com/tag/40186.html
如何成为跨境电商:https://www.goluckyvip.com/tag/40190.html
如何创建fba发货:https://www.goluckyvip.com/tag/40192.html
如何从事外贸:https://www.goluckyvip.com/tag/40195.html
如何用摄影作品表现“芳草鲜美,落英缤纷”的:https://www.vstour.cn/a/411247.html
70岁以上景区门票优惠70周岁还是虚岁?:https://www.vstour.cn/a/411248.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流