Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream

J2EE Question

Hi ,
I am doing sendmail.But i was got error "Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
      at javax.mail.Session.loadProvidersFromStream(Session.java:928)
      at javax.mail.Session.access$000(Session.java:174)
      at javax.mail.Session$1.load(Session.java:870)
      at javax.mail.Session.loadResource(Session.java:1084)
      at javax.mail.Session.loadProviders(Session.java:889)
      at javax.mail.Session.<init>(Session.java:210)
      at javax.mail.Session.getDefaultInstance(Session.java:299)
      at com.kidsarthritis.action.MailClient.sendMail(MailClient.java:22)
      at com.kidsarthritis.action.MailClient.main(MailClient.java:85)
Like this..please help me.How to resolve this error.

Default Text

Verified Answer?

The member who asked this question verified this comment provided the solution that solved their problem.

by:Posted on 2008-12-03 at 04:19:22ID: 23085207

The java.lang.NoClassDefFoundErro happens when the compiler couldn't find you class on you classpath. Make sure your javamail libraries are in your classpath when you try to complile/run your program.

This content is available to Experts Exchange members

See the answer now
with your Free 30 Day Trial

Get unlimited access to solutions & experts

  • 4,169,477 solved questions
  • 3,805 articles & videos
  • 15,413 tech experts

Get Access Now

Need a customized answer?
Ask your question for one-on-one assistance. We will email you when an expert has commented on your question.

We will never share this with anyone.

Not finding the exact answer you need?

Ask the experts for one-on-one help
with your Free 30-day Trial

Get unlimited access to solutions & experts

  • 4,169,477 solved questions
  • 3,805 articles & videos
  • 15,413 tech experts

Get Access Now


Experts Exchange members save,
on average, 2.5 hours per week.

- 2014 EE Annual Survey

People who viewed this question also found these questions helpful:

Related Questions

Related Articles

Written by
Create a Dialog in its Own Thread
In general, it is best to do all U/I activities in your program's main thread, but there are cases where having a second U/I thread can be worth the e…
Written by
Utilize VMWare To Recover Exchange 2003 Information Stores Post Exchange 2007 …
The purpose of this article is to document the steps needed in order to restore an Exchange 2003 Information Store after you have migrated to Exchan…
Written by
POSIX Threads Programming in C++
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in or…
Written by
Najam uddin
COM Calling WCF
Having new technologies does not mean they will completely replace old components. Recently I had to create WCF that will be called by VB6 compon…
Written by
Jerry Paladino
Automate Finding Cell Errors with the 'Find Cell Errors' Utility
By Jerry Paladino Introduction In Excel there is no built-in method to generate a report of all error codes in a worksheet let alone an entire wor…
Written by
MS Access Beginners: How to utilize an Experts solution in the VBA editor with MS Acc…
This tutorial will show you how to take a solution from an expert on EE in VBA and apply it to your database object; very good for the beginner, that ha…

Related Videos

Experts Exchange powers the growth and success
of technology professionals worldwide.

  • Solve

    Experts Exchange is the tech professional’s trusted, on-demand resource for solving difficult problems, making informed decisions, and delivering excellent solutions.

  • Learn

    With unparalleled access to technical experts, verified real-world solutions, and diverse educational content, Experts Exchange enables personalized development of technology skills.

  • Network

    Experts Exchange gives you the professional exposure and valued relationships key to building the career you want.

Join the Network Today

See Plans and Pricing