• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

java.lang.NoClassDefFoundError: javax/mail/Address Exception when sending a mail from Eclipse?

 
Ranch Hand
Posts: 52
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I want to send a mail from Eclipse.

I had added the mail.jar in the library.

But still I am getting the following error



The JavaX has been added in the User Libraries of Eclipse it has following Jars
javax-wsdl-1.5.1.jar
jaxrpc.jar
mail.jar
saaj.jar

and my code looks as follows




So Please help me to solve the above error

Thanks in Advance,
 
Marshal
Posts: 79969
396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which folder is that java mail .jar in?
How are you setting the classpath for your application?
When I Googled for Java Mail, I found a download page where Message appears to be in mail.jar. Please confirm you have got that mail.jar file in the classpath as well.
 
Kushi Gadiparthi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for the Reply. I had added this jar in the eclipse --> preferences-->java-->BuildPath-->classpath variables.


But still no use, getting the same message.


Thanks in Advance.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Build path and runtime path are different things; both need all jar files.
 
permaculture is largely about replacing oil with people. And one tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic