How can I add files to a Jar file?

Tags: ,



I want to add a series of files previously extracted from other files(already done) to a jar. These files will be overwriting files inside the JAR. What is the most efficient way to do it?
I need it to be fast.
Thank you!

Answer

A JAR file is a ZIP file, remember.

Just use some ZIP library.



Source: stackoverflow