Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required libra

Posted guoshunwgs

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required libra相关的知识,希望对你有一定的参考价值。

http://yhjhappy234.blog.163.com/blog/static/31632832201302195511390/

解决办法:

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

 

以上是关于Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required libra的主要内容,如果未能解决你的问题,请参考以下文章

Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access

Access restriction: The type QName is not accessible due to restriction on required library

Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on require

Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required libra

关于Access restriction: The type 'Application' is not API (restriction on required library)(示例

Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:Pr(