Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.NoClassDefFoundError: javax/mail/Authenticator PLEASE HELP :-(

843834Jul 2 2008 — edited Jul 2 2008
Hey there,

tryin 2 send mail with attachment...and autentification...but always get the error in topic.

Code:


import javax.mail.Authenticator;
+.+
+.+
+.+
+.+


public class MailCommunicator
+{+



+public void postMail( String recipients[ ], String subject,+
String message , String from) throws MessagingException
+{+
boolean debug = false;

+//Set the host smtp address+
Properties props = new Properties();
props.put("mail.smtp.host", "smtp.web.de");
props.put("mail.smtp.auth", "true");

Authenticator auth = new SMTPAuthenticator();

etc.

Path is set 2 the mail.jar, smtp.jar and...just 4 tryout...activation.jar.
Does it matter where these jars are located if i set the path?
Also...if i hower over the import statement, it tells..."This element has no attached javadoc and the javadoc could not be found in the attached source"...

I'am workin with eclipse...already found out that, if i open the libraries in eclipse (with that little nice plus) it says "Source attachment : None", "Javadoc attachment:None" an so on... i edit it manually and set the path 2 the source (javamail folder)...but that still didnt solve the prob.

Any suggestions?
the right folder
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 30 2008
Added on Jul 2 2008
1 comment
2,821 views