The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.

来源:互联网 发布:数据库未打开怎么解决 编辑:程序博客网 时间:2024/06/10 20:55

eclipse遇到报错:

 

The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar

 

google后发现用以下方式解决:

这个事eclipse的设置问题,它默认把这些受访问限制的API设成了ERROR,你只要把
Windows-Preferences-Java-Complicer-Errors/Warnings
里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过了。

原创粉丝点击