java.lang.NoClassDefFoundError: javax/mail/Message
843841Feb 6 2007 — edited Feb 7 2007Hi,
I have been trying many demos for JavaMail trying to get it to work after I just installed it now and I'm having configuration problems I believe since I can't get any demo to work all with error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Message
I went to
http://java.sun.com/products/javamail/
and
http://java.sun.com/products/javabeans/jaf/downloads/index.html
and downloaded and installed JavaMail and JavaBeans Activation Framework. I put mail.jar and activation.jar into my
C:\Program Files\Java\jdk1.5.0_07\jre\lib\ext
so the programs compile now fine.
I have also changed my CLASSPATH a hundred times. Right now it is currently:
.;"C:\Program Files\Java\jre1.5.0_09\lib\ext\QTJava.zip";"C:\Program Files\Java\javamail-1.4\mail.jar";"C:\Program Files\Java\jaf-1.1\activation.jar"
When I try to run the demo that came with JavaMail, I followed the instructions in the README.txt and I can compile msgshow fine, but when I run "java msgshow" I get the error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingException
When I try to run the example I found here:
http://www.javaworld.com/javaworld/jw-10-2001/jw-1026-javamail.html?page=1
I get the error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Message
If anyone could help me to get rid of this configuration issue and get simple demos to work I would be very grateful!
Michael