• Post Reply Bookmark Topic Watch Topic
  • New Topic

javamail API -- setFrom() fail with NoClassDefFound error

 
Jarrod Mennuobe
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to get the javamail API working with commons email.

When I try to call setFrom() I get a NoClassDefFoundException looking for com.sun.mail.util.LineInputStream.

I've made sure that activation.jar, commons-email.jar, and mail.jar are in my classpath. I've tried both versions 1.3.3 and 1.4 of mail.jar.

Any help would be greatly appreciated.

Here's my code:


[ April 18, 2006: Message edited by: Jarrod Mennuobe ]
[ April 18, 2006: Message edited by: Jarrod Mennuobe ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That class is in mail.jar. Maybe recheck that there is no typo in the classpath, and that the jar file is OK (by using "jar tf mail.jar).
 
Macy Sasha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use jarsearch.com to find the right jar file whenenver you get a noclassdeffoundexception. You enter the classname or package and class and it will tell you what jar files have the class. Happy Troubleshooting!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!