I am trying to get JavaMail to work, it compiles fine, but when I try and run the application, it causes this error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Session
at testEmail.main(testEmail.java:15)
Here is a partial code clip:
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class testEmail
{
public static void main(String[] args)
{
try
{
Properties props = new Properties();
props.put("mail.host",""
//ERROR HERE
Session mailConnection = Session.getInstance(props,null);
}
catch(Exception e)
{
System.out.println("Exception Occurred"
e.printStackTrace();
}
}
}
Has anyone ever received this error?
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Session
at testEmail.main(testEmail.java:15)
Here is a partial code clip:
import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class testEmail
{
public static void main(String[] args)
{
try
{
Properties props = new Properties();
props.put("mail.host",""
//ERROR HERE
Session mailConnection = Session.getInstance(props,null);
}
catch(Exception e)
{
System.out.println("Exception Occurred"
e.printStackTrace();
}
}
}
Has anyone ever received this error?