Netbeans: Using JavaMail in normal Java projects
- by Yohan
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?