I used to send emails with javamail and Java 8.
Now that I upgraded to Java 12 I get the java.lang.NoClassDefFoundError: javax/activation/DataHandler
.
I added the javax.activation-api-1.2.0.jar
and now I get java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
.
This is because javax.activation-api-1.2.0.jar
doesn't have the com.sun...
package that previous versions had.
What jars should I put on my project to properly send and email with java 12? And where to find them?
There are a lot of confusing sources like:
https://repo1.maven.org/maven2/javax/activation/javax.activation-api/1.2.0/
You need the implementation jar file, not the API jar file. Use this.