为什么这段代码在Eclipse里会有这样的异常呢? 这是什么异常呢?
java.security.NoSuchAlgorithmException: Algorithm DESede not available
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.KeyGenerator.getInstance(DashoA6275)
at Skey_DES.main(Skey_DES.java:14)
/*
* 产生对称密钥
*/
import javax.crypto.*;
public class Skey_DES
{
public static void main(String[] args)
{
try
{
KeyGenerator kg=KeyGenerator.getInstance("DESede");
kg.init(168);
SecretKey k=kg.generateKey();
}
catch(Exception e){e.printStackTrace();}
}
}
------解决方法--------------------------------------------------------
在Dos下面编译是通过的.