Java. Lang. noclassdeffounderror: COM/Sun/mail/util/lineinputstream

Source: Internet
Author: User
ArticleDirectory
  • Cause of exception:
  • Solution:

 

Exception in thread "Main" Java. Lang. noclassdeffounderror: COM/Sun/mail/util/lineinputstream

Cause of exception:

The Java EE version is different from that of javamail.
For example, if javamail 1.3 or lower is on javaee5, the above error will occur, but it will work normally in javaee1.4. (However, I have tried javaee5 + javamail1.4.) Because javaee5 contains javamail classes but is not comprehensive, the javamail package conflicts.

 

 

Solution:

Download the latest mail. jar from sun and remove the Java EE package that comes with myeclipse.

But you may also need to use the servlet related classes in the EE package, you can copy the servlet-api.jar from the Lib folder of Tomcat to the project, use it to replace the EE package, everything is OK !.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.