Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while sending email through java.mail

 
rahamath basha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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)
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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 ]
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic