Access restriction: The constructor SunJCE() is not accessible due to restrictio

Access restriction: The constructor SunJCE() is not accessible due to restriction on required library...
在研究java加密算法时出现了以下编译错误: Access restriction: The constructor SunJCE() is not accessible due to restriction on required library
sunjce_provider.jar 由于必须的库限限制访问,SunJCE() 构造函数不可访问。

在网上搜了一下,解决办法是修改编译选项,方法如下:Window -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API -> Forbidden reference (access rules) -> Warnings,或者在项目上修改编译选项。

你可能感兴趣的:(异常)