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

Source: Internet
Author: User

Writing emailsProgramAn error is reported!

 

The main reason is that

 

Javax. mail and javax. the activation packages belong to the basic package in javaee5, that is, they are included in JDK, but the methods in them are similar to the existing Mail. jar and activation. jar has some differences, so beginners are copying others directly.CodeWhen the above error occurs.
The following is a solution.
Enter

X:/program files/myeclipse 6.5/myeclipse/Eclipse/plugins/COM. genuitec. Eclipse. j2eedt. core_6.5.0.zmyeclipse650200806/data/libraryset/ee_5

In this path, you can see javaee. jar, open the file with rar, and then enter the javax folder to delete mail. jar and activation. jar (My javaee. jar, these two items are folders. If you delete them, it will be OK, but remember to back up them)

After deletion, run the following code. After a simple modification, you can receive emails! I have tested it completely feasible.

 

 

 

 

 

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.