解决 com.sun.*包导入错误

解决 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就可以编译通过,不再报错。 

原文地址:https://www.cnblogs.com/zr520/p/6009390.html