error for 'Access restriction: The type AESKeyGenerator is not accessible due to restriction on required library D:\Programles\Java\jdk1.6.0_43\jre\lib\ext\sunjce_provider.jar'

when running the segment code

 com.sun.crypto.provider.AESKeyGenerator.class.getClassLoader().getClass().getName();

in the eclipse 4.3.2.

solution:

  1. Open the 'JRE System Libraries' tab of the 'Build Path' project property window.
  2. Select the 'Config Build Path...'.
  3. Select "Access rules" of the 'JRE System Libraries' and hit the Edit button.
  4. Click the Add button in the resulting dialog.
  5. For the new access rule, set the resolution to Accessible and the pattern to "com.sun.crypto.provider/**".

that would solves the problem.

ref:

Access restriction: Is not accessible due to restriction on required library ..\jre\lib\rt.jar

(Error) The type AESKeyGenerator is not accessible due to restriction on required library.的更多相关文章

  1. 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重新加入. ===== ...

  2. Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not accessible due to restriction on required library

    异常: Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not access ...

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

    报错: 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. 报错: The type ByteInputStream is not accessible due to restriction on required library

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

  6. 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 ...

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

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

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

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

  9. 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 ...

随机推荐

  1. frameset iframe用来分页

    frameset用来分大的框架 iframe用来在frame分框架之后,内嵌分割. <FRAMESET border=1 frameSpacing=1 borderColor=#47478d r ...

  2. BZOJ 1037 生日聚会

    Description 今天是hidadz小朋友的生日,她邀请了许多朋友来参加她的生日party. hidadz带着朋友们来到花园中,打算坐成一排玩游戏.为了游戏不至于无聊,就座的方案应满足如下条件: ...

  3. Extjs打开window窗口自动加载html网页

    Window inherits the autoLoad config option from Panel. Note that I included all config options below ...

  4. Shuffle'm Up

    poj3087:http://poj.org/problem?id=3087 题意:题意简化之后的就是:给你两个长度均为c的字符串s1,s2,然后给你一个2*c的串ss,现在每次从s2,中取一个,然后 ...

  5. c# 类;一维数组;二维数组

    1. 输入邮箱帐号,判断格式是否正确  (1)有且只有一个@          Contains IndexOf ==LastIndexOf  (2)不能以@开头           StartsWi ...

  6. 想做Android Wear开发?你得先搞明白这四件事

    手环和手表的腕上穿戴之争,随着Apple Watch发布和Android Wear不断完善而告一段落.尽管续航上略有缺陷,但手表以其类似手机可扩展的生态环境赢得了众多巨头的支持. Google曾透露, ...

  7. MFC UpdateData(true) 失败原因

    关于MFC  UpdateData的介绍SurpassLi博主在http://www.cnblogs.com/lidabo/archive/2012/07/17/2595464.html 已经介绍的很 ...

  8. WCF扩展系列 - 行为扩展(Behaviors)

    原文地址:http://www.cnblogs.com/Creator/archive/2011/05/21/2052687.html 这个系列的第一部分将会重点关注WCF行为(behaviors), ...

  9. 字符编码 ASCII,Unicode 和 UTF-8 概念扫盲

    今天中午,我突然想搞清楚Unicode和UTF-8之间的关系,于是就开始在网上查资料. 结果,这个问题比我想象的复杂,从午饭后一直看到晚上9点,才算初步搞清楚. 下面就是我的笔记,主要用来整理自己的思 ...

  10. autoIT 自动化上传/下载文件图文详解【python selenium】

    情景: 在用selenium进行web页面自动化时,时不时会遇到上传附件的情况,常见的情况就是一个上传按钮,点击后弹出windows窗口,选择文件后上传,如下图1所示 图1 这种情况超出了seleni ...