How do I package a JavaMail application into a single jar file along with the mail.jar and activation.jar?

John Zukowski

You need to unjar all the JAR files into a single directory tree and then JAR them back up. The trick is preserving the location of some files:

   425 Fri Dec 01 00:05:16 EST 2000 META-INF/javamail.default.providers
    12 Fri Dec 01 00:05:16 EST 2000 META-INF/javamail.default.address.map
  1124 Fri Dec 01 00:05:16 EST 2000 META-INF/javamail.charset.map
   469 Fri Dec 01 00:05:16 EST 2000 META-INF/mailcap
Make sure these end up in the same location in the new JAR.
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.