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:
- Open the 'JRE System Libraries' tab of the 'Build Path' project property window.
- Select the 'Config Build Path...'.
- Select "Access rules" of the 'JRE System Libraries' and hit the Edit button.
- Click the Add button in the resulting dialog.
- For the new access rule, set the resolution to Accessible and the pattern to "com.sun.crypto.provider/**".
that would solves the problem.
ref: