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

posted @ 2016-10-28 20:57  Hotsum  阅读(985)  评论(0编辑  收藏  举报