When you write a message to send a related program, the error occurs.
The main reason is
Javax.mail and Javax.activation These two packages already in javaEE5 belong to the base package, is the JDK has already, but inside the method and now outside of the Mail.jar and Activation.jar have some access, so beginners in the direct copy of other people's Code Time will often appear above the error.
No more nonsense, here's the solution.
Enter the
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 the Javaee.jar, open the file with RAR, then go into the Javax folder, delete the Mail.jar and Activation.jar ( My Javaee.jar, these two things are folders, in short, delete the OK, but to pay attention to backup it
After the deletion of the following code to run, simple changes after the line can be implemented to receive the message function. I've tested it perfectly.