Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access
来源:互联网 发布:软件业务需求分析 编辑:程序博客网 时间:2024/06/06 10:42
准备使用Java进行图片压缩的时候,使用
将 Deprecated and restricted API 中的 Forbidden references(access rules) 选为Warning就可以了。
import com.sun.image.codec.jpeg.*;
结果出现错误:
Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not accessible due to restriction on required library上网查了一下,发现是IDE的设置问题,它默认把这些受访问限制的API设成了ERROR
解决方法:
Windows->Preferences->Java->Complicer->Errors/Warnings 0 0
- Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access
- Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access
- Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access
- Access restriction: The type 'JPEGCodec' is not API 报错
- Access restriction: The method XXX from the type XXX is not accessible due to restriction XXX
- Access restriction: The method getCombiningClass(int) from the type Normalizer is not accessible due
- Access restriction: The type JPEGCodec is not accessible due to restriction on required library
- Access restriction: The type JPEGCodec is not accessible due to restriction on required library
- Access restriction:The type JPEGCodec is not accessible due to restriction on required library
- Access restriction:The type JPEGCodec is not accessible due to restriction on re
- Eclipse 警告提示:Access restriction:The type JPEGCodec is not accessible due to restriction on
- 报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library
- Access restriction:The type JPEGCodec is not accessible due to restriction on required library
- Access restriction:The type JPEGCodec is not accessible due to restriction on required library
- Access restriction:The type JPEGCodec is not accessible due to restriction问题解决
- Access restriction:The type JPEGCodec is not accessible due to restriction on re
- 报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library
- Access restriction: The method encode(byte[]) from the type CharacterEncoder,Access restriction: The type FileURLConnection is n
- hdu 5412 CRB and Queries(树套树模板,区间第K大)
- linux定时任务的设置
- js的表达式,运算符,与优先级
- PAT 1017 A除以B (大数相除)
- Linux命令(7)
- Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not access
- uva 725Division
- 找出字符串中第一个只出现一次的字符
- java 遍历MAP
- C++: std::string 与 Unicode 如何结合?
- Zoj3201 Tree of Tree 树形DP
- 欢迎使用CSDN-markdown编辑器
- Java中的动态绑定和静态绑定
- 将一个或多个OC对象写入文件/从文件读出