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: com/sun/mail/util/MailDateFormat

843830Apr 10 2002 — edited Nov 20 2002
I'm trying to test sending an email and I get the following error ar Runtime:

java.lang.NoClassDefFoundError: com/sun/mail/util/MailDateFormat
at JavaMailTest.SendMail.postMail(SendMail.java:33)
at JavaMailTest.SendMail.main(SendMail.java:63)
Exception in thread "main"

The line that causes this exception is:
Session session = Session.getDefaultInstance(props, null);
===> Message msg = new MimeMessage(session);

Why is the MimeMessage class looking for MailDateFormat in com.sun.mail.util when this class only exists in javax.mail.internet(at least in mail.jar,mailapi.jar).

Am I missing something here? Any help appreciated.

thanks,
Peter


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 18 2002
Added on Apr 10 2002
4 comments
1,793 views