[英]java.security.NoSuchAlgorithmException: Cannot find any provider supporting Blowfish/ECB/PKCS5Padding
I have upgraded to jdk1.8.0_131
from jdk1.8.0_121
(jre as well) by uninstalling older and installing newer jdk and encryption code stopped to work. 我已通过卸载较旧的jdk和安装较新的jdk从
jdk1.8.0_121
(以及jre)升级到jdk1.8.0_131
,并且加密代码停止工作。
Source code : http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#BlowKeyEx 源代码: http : //docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html#BlowKeyEx
Error in eclipse : 日食错误:
Exception in thread "main" java.security.NoSuchAlgorithmException: Blowfish KeyGenerator not available
at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:169)
at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:223)
at com.encrypt_app.BlowfishKey.main(BlowfishKey.java:12)
Working without any error if run without IDE. 如果在没有IDE的情况下运行,则不会出现任何错误。
Steps I taken: 我采取的步骤:
Went to Windows > Preferences > Installed JREs
and changed Directory to C:\\Program Files\\Java\\jdk1.8.0_131
. 转到
Windows > Preferences > Installed JREs
,并将目录更改为C:\\Program Files\\Java\\jdk1.8.0_131
。 Ensured Build Path setting of project. 确保项目的构建路径设置。
Tried restart eclipse, clean, refresh project. 尝试重新启动Eclipse,清理并刷新项目。
Updated JAVA_HOME to C:\\Program Files\\Java\\jdk1.8.0_131
将JAVA_HOME更新为
C:\\Program Files\\Java\\jdk1.8.0_131
-- Run same code without IDE and it worked. -在没有IDE的情况下运行相同的代码,并且可以正常工作。
-clean
argument (edited eclipse.ini) -clean
参数启动eclipse(编辑eclipse.ini) 从构建路径中删除库,然后使用更新的JRE重新添加。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.