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. 怎样找到native speaker的感觉

  2. NXP LPC11xx I2C Slave 从机程序

    /**************************************************************************** * $Id:: i2cslave.c 363 ...

  3. c#,if 分支语句,条件运算符

    //输入整数a和b, //若a²+b²大于100,则输出a²+b²百位以上数字, //否则输出两数之和 /*Console.Write("请输入整数a:"); int a = in ...

  4. FSB\QPI\DMI总线的区别

    FSB\QPI\DMI总线的区别 zjdyx91                     一些客户问:intel CPU有的是前端总线(FSB),有的是QPI总线,有的又是DMI总线,这就把人弄晕了, ...

  5. POJ3087 Shuffle'm Up(模拟)

    题目链接. AC代码如下; #include <iostream> #include <cstdio> #include <cstring> #include &l ...

  6. 图论(费用流):BZOJ 4514 [Sdoi2016]数字配对

    4514: [Sdoi2016]数字配对 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 820  Solved: 345[Submit][Status ...

  7. android画虚线的自定义VIew

    package com.yesway.ycarplus.view; import android.annotation.SuppressLint; import android.content.Con ...

  8. C - Catch That Cow

    题目大意 农民约翰需要抓住他的牛,他和他的牛在一条直线上(估计是一维生物),约翰在NN; ; ; i<; i++)        {            )                q- ...

  9. 庖丁解牛FPPopover

    作者:ani_di 版权所有,转载务必保留此链接 http://blog.csdn.net/ani_di 庖丁解牛FPPopover FPPopover是一个实现Popover控件的开源项目,比标准控 ...

  10. 监控 Linux 性能的 18 个命令行工具

    http://www.oschina.net/translate/command-line-tools-to-monitor-linux-performance 1.Top-Linux进程监控 Lin ...