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. Unity3D批处理脚本

    Unity3D批处理脚本 本文属于转载,如有侵权,请留言,我会及时删除! Max09在模型到处的模型和U3D场景的尺寸不一致,Max09中的1m导到U3D中,只有0.01m,这时可以在U3D中将模型的 ...

  2. Light OJ 1018 - Brush (IV)

    题目大意:     一个二维平面上有N个点,一把刷子,刷一次可以把一条线上的所有点都刷掉.问最少刷多少次,可以把全部的点都刷完 状态压缩DP, 用记忆化搜索来写, 需要有个优化不然会超时. ===== ...

  3. HDU 5478 Can you find it(数学问题)

    题目大意: 给你  ak1⋅n+b1+ bk2⋅n−k2+1 = 0 (mod C)(n = 1, 2, 3, ...). 要求所有的n都满足上述的式子. 问这样的a,b 有多少对?   分析这个问题 ...

  4. android.process.acore和system进程

    从源码看来,android.process.acore进程应该是一些基本功能的载入程序. android-4.3_r2.2中,它包括以下项目: 1.UserDictionaryProvider < ...

  5. SRM 407(1-250pt, 1-500pt)

    DIV1 250pt 题意:每个员工可以有几个直系上司,也可以有几个直系下属.没有直系下属的人工资为1,有直系下属的人工资为所有直系下属工资之和.求所有人工资之和.人数 <= 50. 解法:直接 ...

  6. POJ3617 Best Cow Line

    其实是学习参考了算法书的代码,但仍然是我自己写的,有小差别.贪心类型. #include <iostream> using namespace std; int main() { int ...

  7. linux 编译安装apache

    1.下载apache.安装apache #wget http://apache.etoak.com//httpd/httpd-2.4.4.tar.gz #tar zxvf httpd-2.4..4.t ...

  8. E - 食物链 poj1182

    题目告诉有  3  种动物,互相吃与被吃,现在告诉你  m  句话,其中有真有假,叫你判断假的个数  (  如果前面没有与当前话冲突的,即认为其为真话  ).每句话开始都有三个数 D A B,当D = ...

  9. poj2393

    题目大意: 奶酪工厂 奶牛买了一个奶酪工厂制作全世界有名的Yucky酸奶,在接下来的N周(1<=N<=10000),牛奶的价格和工作将会受到波动例如他将花费C_i (1 <= C_i ...

  10. Linux下设置文件权限

    文件权限示意图: 第一步:在终端创建用户 增加用户 useradd 用户名 设置密码 passwd 用户名 通过上述两条命令创建a1,a2两个用户. 第二步:在根目录使用管理员账号创建一个文件 在使用 ...