So I need to remove a file from a .jar
or .war
file.
I was hoping there was something like jar -d myjar.jar file_I_donot_need.txt
But, right now the only way I can see of doing this from my Linux command line (without using WinRAR/Winzip or the Linux equivalent) is to
- Do
jar -xvf
and extract the complete.jar
file - Remove the file(s) I don't need
- Re-jar the
.jar
file usingjar -cvf
Please tell me there is a shorter way.
./myscript.sh -d <list of files>