Search code examples
javajarziparchive

Fast alternative to jar command to update a .jar


I need to insert a folder into a .jar file.

So far I tried

jar u myJar.jar myFolder

However this takes for ever, the folder is +300MB. I also tried with

zip myJar.jar myFolder

it says

updating: myFolder/ (stored 0%)

but nothing happens

Anyone knows a good alternative?


Solution

  • As found out in the comments, the zip command was missing a -r to recursively include the folder :

    zip -r myJar.jar myFolder