Question

I have a java programs that outputs a warning for missing javax.activation.DataHandler and javax.mail.internet.MimeMultipart
I'm not sure what these are used for, nor can I recall adding any specific code that may require these classes.

I realize the warning can be resolved by adding the activation.jar and mailapi.jar, but I'm interested in knowing what these jars/classes are meant for? What is the purpose of the JAVA activation framework?
What could be the reason that my program complains for not having these classes?

Thanks.

Was it helpful?

Solution

My guess is you're using JavaMail to send an email, but you don't need attachments.

The activation framework is used to find handlers for more advanced situations - such as sending attachments. JavaMail will look for the JAF when it's first initialized. If your program is working without it, you don't need to worry about the warning.

(Our build system always had this and it never caused a problem.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top