Eclipse中Cannot find any provider supporting DES解決之道

原文地址 : 點擊打開鏈接

原文出處:http://blog.csdn.net/darwinchina/article/details/12037999

異常:

[java] view plain copy
  1. Caused by: java.security.NoSuchAlgorithmException: Cannot find any provider supporting DES  
  2.     at javax.crypto.Cipher.getInstance(Cipher.java:524)  

問題重現:

在Eclipse中運行下面的代碼。(該異常會在IDE Eclipse運行中出現,但不會在控制檯運行中出現)

[java] view plain copy
  1. public static void main(String[] args) throws Exception  
  2. {  
  3.     Cipher.getInstance("DES");  
  4. }  


發生原因:

未知


解決方法:

Window-->Preferences-->Java-->Installed JREs

當前項目使用的JRE設置爲是default JRE




解決方法來源:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=89935

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章