(Error) The type AESKeyGenerator is not accessible due to restriction on required library.

本文介绍了解决在Eclipse 4.3.2中遇到的'Accessrestriction:ThetypeAESKeyGeneratorisnotaccessibleduetorestrictiononrequiredlibrary'错误的方法。通过修改项目的JRE系统库设置中的访问规则,使特定包变得可访问。

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 

1 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

转载于:https://www.cnblogs.com/listened/p/3674543.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值