报错: 
Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar 
  
解决方法: 
Project -> Properties -> libraries,

先remove掉JRE System Library,然后再Add Library重新加入。

============================================

在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-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 library的更多相关文章

  1. Access restriction: The type JPEGImageEncoder is not accessible due to restriction

    转: 解决办法:Access restriction: The type JPEGImageEncoder is not accessible due to restriction 2011年11月2 ...

  2. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

    解决方法: Project -> Properties -> libraries, 先remove掉JRE System Library,然后再Add Library重新加入. ===== ...

  3. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar 报错

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  4. 解决:高版本jdk编译低版本代码时eclipse提示Access restriction:The type 'Unsafe' is not accessible due to restriction on required library

    在Eclipse中采用高版本jdk编译一些低版本的源码时,由于源码中使用了一些高版本中过时的API,可能就会报错,类似于: Access restriction:The type 'Unsafe' i ...

  5. Access restriction: The type VerticalTextSpinner is not accessible due to restriction on required library........

    查了下竟然是编译器报错,orz了. Access restriction: 访问限制 on required library: 在依赖库(第三方包) 那就简单了,取消限制就好, eclipse的Win ...

  6. MyEclipse报错Access restriction: The type BASE64Encoder is not accessible due to restriction on required library

    错误截图: 解决办法: 1.进入Project --> Properties --> Java Build Path --> Libraries 2.remove 掉 JRE Sys ...

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

    There's another solution that also works. I found it on this forum: Go to the Build Path settings in ...

  8. Access restriction: The type BASE64Encoder is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

    解决方案:在configure build path 中去掉 jre system library,然后重新加载jre system library.....

  9. Access restriction: The type Resource is not accessible due to restriction on required library

    方法一: 全局属性Project>preferences>java>Compiler>Errors/Warnings>把右侧的[Deprecated and restri ...

随机推荐

  1. 【转】Unity3D学习日记(一)使用UGUI制作虚拟摇杆

    http://blog.csdn.net/begonia__z/article/details/51170059 如今手机游戏玩法多种多样,尤其使用虚拟摇杆进行格斗类游戏开发或者是MMORPG成为了主 ...

  2. RUBY 模拟rtsp消息

    require 'rtsp/client' require 'log_switch' require 'socket' RTSP::Client.log? # => false RTSP::Cl ...

  3. Codeforeces 954C Matrix Walk

    题目大意 考虑一个 $x\times y$ 的矩阵 $A_{x\times y}$ ,$A_{i,j} = (i-1)x+y$ . 从矩阵中的某个位置出发,每次可向上下左右移动一步,每到一个位置,记录 ...

  4. ci支持pathinfo

    location ~ \.php { #去掉$ root H:/PHPServer/WWW; fastcgi_pass ; fastcgi_index index.php; fastcgi_split ...

  5. 开启dns服务时,/etc/init.d/named start 卡住了的解决办法。

    在命令行输入 rndc-confgen -r /dev/urandom -a  再次开启服务 /etc/init.d/named  start ok

  6. response contentType

    response.setContentType(MIME)的作用是使客户端浏览器,区分不同种类的数据,并根据不同的MIME调用浏览器内不同的程序嵌入模块来处理相应的数据. 例如web浏览器就是通过MI ...

  7. octave学习

    前置安装 octave introduction 杂 clear; close all; clc刷新清空octave 如果写程序后缀名.m help commandname帮助 ;用法同c++ %注释 ...

  8. HDU 4328 Cut the cake

    Cut the cake Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Tota ...

  9. div两侧的boder断开 消失 奇怪

    原文发布时间为:2009-11-06 -- 来源于本人的百度文章 [由搬家工具导入] 解决方法: 设定外层DIV的宽度即可,如 width:99% ========================== ...

  10. 我的arduino theme文件

    #FUNCTIONS COLOR             #D35400 - ORANGE            KEYWORD1 #FUNCTIONS COLOR            #D3540 ...