java.lang.NoClassDefFoundError java.lang.NoClassDefFoundError: javax.mail.internet.MimeMultipart cannot be found by

1. Analysis reason:

  java.lang.NoClassDefFoundError     The reason is that this class does not exist in this project.

But the code compilation phase can be passed. Moreover, this error will not be reported when running on other machines, but only on specific machines.

Possible causes:

A. JDK is not version 1.8, because there are many fewer jar packages in version 1.9, which are very different when running with 1.9 and 1.8,

After troubleshooting, the JDK of the machine reporting an error is also 1.8.

        The final cause of this problem is still unable to locate

2. Problem solving

Add mail. Jar, because the package contains javax. Mail. Internet. Mimemultipart. The problem is solved.

Similar Posts: