Why am I getting package javax.crypto does not exist

前端 未结 3 406
我寻月下人不归
我寻月下人不归 2020-12-11 00:37

When I compile a class using javax.crypto.Mac I get this error message?

package javax.crypto does not exist

3条回答
  •  一个人的身影
    2020-12-11 01:38

    OK, this was a mistake on my part. The Ant file I was using to compile the code had this attribute on the javac task:

    bootclasspath="${java.home}/lib/rt.jar" 
    

    Doh. You can add the JCE jar like this:

    bootclasspath="${java.home}/lib/rt.jar:${java.home}/lib/jce.jar"
    

提交回复
热议问题