File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes Send Mail Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Send Mail Error" Watch "Send Mail Error" New topic

Send Mail Error

ahmed elrouby

Joined: Oct 31, 2004
Posts: 3
hi all
i try to send mail using javax.mail package
but there is an exception that is

java.lang.NoClassDefFoundError: com/sun/mail/util/SharedByteArrayInputStream
at SendApp.send(
at SendApp.main(
Exception in thread "main"

this is my code

[Code tags added, toned down the title - Dave]
[ October 24, 2005: Message edited by: David O'Meara ]
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Check your classpath, specifically for mail.jar (or J2EE.jar).

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Moving this ot the Other Java Api forum.

This forum is for Servlet questions only.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Send Mail Error
It's not a secret anymore!