Reputation: 3229
I have built a program in NetBeans, it creates myprogram.jar file but also creates folder named lib which includes JavaMail's mail.jar file. So I want to send that program to my friend without having to send him lib folder and telling him to put them together. So is there any way I can add all that in single .jar file? Thanks.
Upvotes: 1
Views: 369
Reputation: 3229
So I found this kind of solution, which was wery easy to understand, doesn't include any other program than NetBeans and which worked excellent for me. Here is the link: http://javanepal.wordpress.com/2009/09/15/merging-jar-files-to-single-jar-via-ide-netbeans-6-7/
Upvotes: 1
Reputation: 28762
If i'm not mistaken you cannot add jar files to jars. What you can do is extract the contents of the jars you have (preserving the directory structure) and then jar the resulting directory hierarchy by follow the instructions on how to create jar files
Of course once you figure out the exact commands involved, you could create a batch file to do the work for you again.
Upvotes: 0