• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error while sending email through java.mail

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
at javax.mail.Session.loadProvidersFromStream(Session.java:901)
at javax.mail.Session.access$0(Session.java:898)
at javax.mail.Session$1.load(Session.java:852)
at javax.mail.Session.loadResource(Session.java:1035)
at javax.mail.Session.loadProviders(Session.java:871)
at javax.mail.Session.<init>(Session.java:191)
at javax.mail.Session.getDefaultInstance(Session.java:280)
at SendEmail.SendMessage(SendEmail.java:37)
at SendEmail.main(SendEmail.java:15)
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In order to use JavaMail you need to include the JavaMail jar (mail.jar) in your classpath. Its got all the implementing classes (including com.sun.mail.util.LineInputStream) - if you have done this, check you mail.jar is not corrupt.
[ October 20, 2004: Message edited by: Paul Sturrock ]
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the "Other API's" forum where they discuss Java Mail quite often.

Please post your replies there, thanks!
 
reply
    Bookmark Topic Watch Topic
  • New Topic