Java Mail exception.

A

alan_conoco

Hi,

i am new to javamail and am having problems getting a simple example
working.

the following snippet of code compiles ok....

MimeMessage msg = new MimeMessage(session);

..... but throws the exception printed below.

Exception in thread "main" java.lang.NoClassDefFoundError:
javax/activation/DataSource

i'm confused because i couldnt find any reference to a javax.activation
package in any docs.

any help appreciated!

Alan
 
T

Thomas Weidenfeller

.... but throws the exception printed below.

Exception in thread "main" java.lang.NoClassDefFoundError:
javax/activation/DataSource

i'm confused because i couldnt find any reference to a javax.activation
package in any docs.

Sure?

From the JavaMail NOTES.txt file:
Your problem: javax.mail or javax.activation classes not found when compiling.
Our response: You didn't set CLASSPATH correctly to find mail.jar and
activation.jar. See README.txt.


From the JavaMail README.txt file:
Requirements
------------

Note that the JavaMail API requires the JavaBeans(TM) Activation
Framework package to be installed as well. Download the latest version
of the JavaBeans Activation Framework from

http://java.sun.com/beans/glasgow/jaf.html

and install it in a suitable location.


From the JavaMail product page
http://java.sun.com/products/javamail/index.jsp
Note: You will also need the JavaBeans Activation Framework (JAF) extension that provides the javax.activation package. We suggest you use version 1.1 of JAF, the latest release.

So much for no references in any docs ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,585
Members
45,080
Latest member
mikkipirss

Latest Threads

Top