Netbeans: Using JavaMail in normal Java projects

Posted by Yohan on Stack Overflow See other posts from Stack Overflow or by Yohan
Published on 2012-09-02T14:34:30Z Indexed on 2012/09/02 15:38 UTC
Read the original article Hit count: 181

Filed under:
|
|
|
|

I am creating an desktop application which is capable of sending emails. I downloaded mail.jar and javaee.jar and added it to my project libraries. However, when I am trying to use it, it gives me the error

java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Uncompilable source code - package javax.mail does not exist

I imported those packages as,

import javax.mail.*

It added correctly, as shown in the following image. Please help!! How can I make this work?

enter image description here

© Stack Overflow or respective owner

Related posts about java

Related posts about java-ee