Eclipse中Cannot find any provider supporting DES解决之道
原文地址 : 点击打开链接
原文出处:http://blog.****.net/darwinchina/article/details/12037999
异常:
- Caused by: java.security.NoSuchAlgorithmException: Cannot find any provider supporting DES
- at javax.crypto.Cipher.getInstance(Cipher.java:524)
问题重现:
在Eclipse中运行下面的代码。(该异常会在IDE Eclipse运行中出现,但不会在控制台运行中出现)
- public static void main(String[] args) throws Exception
- {
- Cipher.getInstance("DES");
- }
发生原因:
未知
解决方法:
Window-->Preferences-->Java-->Installed JREs
当前项目使用的JRE设置为是default JRE
解决方法来源: