首页 > 技术文章 > 解决 com.sun.*包导入错误

zr520 2016-10-28 20:57 原文

解决 com.sun.*包导入错误 
com.sun.image.codec.jpeg.*导入错误如何解决: 

com.sun.*是受限制访问的API,Eclipse 默认把受访问限制的API设成了ERROR。只要把Windows>Preferences>Java>Complicer>Errors/Warnings>Deprecated and restricted API>Forbidden references(access rules)改为Warning就可以编译通过,不再报错。 

推荐阅读