java.lang.NoClassDefFoundError: javax/mail/Authenticator, whats wrong?

后端 未结 6 749
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 14:09

Send to Email.java

package helper;

//Mail.java - smtp sending starttls (ssl) authentication enabled
//1.Open a new Java class in netbeans (         


        
6条回答
  •  感情败类
    2020-11-28 14:56

    I once ran into this situation and I had the dependencies in classpath. The solution was to include javax.mail and javax.activation libraries in the container's (eg. tomcat) lib folder. Using maven -set them to provided scope and it should work. You will have shared email libs in classpath for all projects.

    Useful source: http://haveacafe.wordpress.com/2008/09/26/113/

提交回复
热议问题