Well, the truth is, there is no one step way to do this. This is what users tend to do:

  • Extract the Jar file
  • Delete the Jar file
  • Run the Jar command to re-create the Jar file.

So yeah, I can make a batch file for this but since I have no idea how to make one, I decided to use Ant.

Here is my script.

The following explains the steps that the build script executes:

  • Go over all folders recursively to look for existing jar files.
  • Extracts them one by one in a folder name that is the name of the Jar file + “_folder”.
  • Delete the old Jar file
  • Re-create the Jar file
  • Delete the folder

That’s it! Simply put the build script file in any folder you want it to start searching for Jar files and it does the rest.

Related Posts Plugin for WordPress, Blogger...