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.