解决办法:Access restriction: The type JPEGImageEncoder is not accessible due to restriction

转载 2013年12月06日 11:59:14
解决办法:Access restriction: The type JPEGImageEncoder is not accessible due to restriction
2010-09-09 00:22
在Eclipse中处理图片,需要引入两个包:
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
报错:
Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar


此时解决办法:
Eclipse 默认把这些受访问限制的API设成了ERROR。只要把Windows-Preferences-Java-Complier- Errors/Warnings里面的Deprecated and restricted API中的
Forbidden references(access rules)选为Warning就可以编译通过。

相关文章推荐

Access restriction: The type is not accessible due to restriction on required library问题处理

在做Java时,遇到了个小问题,在Import 包资源时出现:        Access restriction: The type XXX is not accessible due to re...
  • vtopqx
  • vtopqx
  • 2012年12月16日 14:16
  • 917

Eclipse问题Access restriction: The type 'SunJCE' is not API 解决,并加深理解/jre与/jdk目录下jre的区别

Eclipse问题Access restriction: The type ‘SunJCE’ is not API 解决,并加深理解/jre与/jdk目录下jre的区别今天写程序的时候遇到了一个编译问...

Eclipse中Access restriction: The type ‘XXX’ is not API 解决

报此错误只需将jre由jdk路径下的jre改为外部的jre即可,具体做法为: Project -> Properties -> Java Build Path -> Libraries,选中...

JAVA 使用BASE64提示Access restriction: The method 'CharacterEncoder.encodeBuffer(byte[])' is not API

JAVA 使用BASE64提示 Access restriction: The method'CharacterEncoder.encodeBuffer(byte[])' is not API (r...

Host is not allowed to connect to this MySQL server 和 access denied for user 'root'@'localhost' 解决办法

昨天,我让同事连我的数据库,连不上,报错:Host is not allowed to connect to this MySQL server 这个错误之前也见过,意思是说我的 MySQL 服务器不...

windows 下安装部分gem时出现 Could not create Makefile due to some reason 的解决办法

现象描述: 如果你安装某个需要本地编译代码的gem 时出现了类似如下的错误,则符合本文章所谈论的情况: C:/Develop/Ruby193/bin/ruby.exe extconf.rb ch...
  • woncomp
  • woncomp
  • 2013年04月11日 09:21
  • 1637

Access restriction: The method 'CharacterEncoder.encode(byte[])' is not API (restriction on required

该异常的解决方法是 1:右键点击项目,选择属性properties 2选择java中的Build Path 3:如下图,选中JRE,点击右侧的Edit 会弹出如下的窗口 在Res...

Scene is unreachable due to lack of entry points and does not have an identifier for runtime access

警告: Scene is unreachable due to lack of entry points and does not have an identifier for runtime acc...

'NoneType' object has no attribute '__getitem__'和argument of type 'NoneType' is not iterable 异常的解决办法

python多线程采集新浪微博GPS数据,存入Mongodb。Mongodb要求经纬度的严格顺序为[longtitude, latitude],而微薄返回的顺序正好相反。所以在转换时,报出如上图所示异...
  • era_misa
  • era_misa
  • 2014年04月03日 11:03
  • 22793

error: msp430:Could not access device - security fuse is blown的解决办法

昨天用用JTAG给430下载,结果出现了error: msp430:Could not access device - security fuse is blown的对话框,就怎么也没办法把代码下到4...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:解决办法:Access restriction: The type JPEGImageEncoder is not accessible due to restriction
举报原因:
原因补充:

(最多只允许输入30个字)