This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am developing an application which uses the JavaMail API. I have found JavaMail very easy to use, but, while packaging my application, I have run into a problem. I wish to package my application into a single self-extracting jar file. However, I also want to include the JavaMail jars (mail.jar, activation.jar, etc) in my application so that my clients don't have to put the JavaMail jars into their /lib/ext folders. I have not been able to successfully package my application into one self-extracting jar file without getting a NoClassDefFoundError at runtime.
Could anyone please advise me on how to package the JavaMail jar files into my application? I have done some searching and can only come up with this bug report.
TBA [ May 25, 2006: Message edited by: Tomas Anderson ]
The bug report sounds to me as if it is about a different problem.
Generally, you should have no problems creating just one jar file out of many. However, you may run into problems if people already have one or more of the jars in their extension directory. You could easily get a version mismatch in that case. Might that be the case here?