It’s pretty common that you might want to change a configuration for a .jar or .war package. How bothering it is to unpack the archieve, find the file, do you change, delete old package, repackage – so much hassle for a little modification.
Since you landed on this page, it could get as easy as using vim
editor. Did you know that .jar is essentially follows the same format as .zip. Because of that, you can use vim
in following manner also with .zip and .war files. It’s just:
1 |
vim tests.jar |
Brings us to interactive mode showing content of the archive.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
" zip.vim version v23 " Browsing zipfile /Users/pstas/freports/reports/tests.jar " Select a file with cursor and press ENTER tests/ tests/classes/ tests/classes/com.concur.tap.trap.rpm.DistributionTest.html tests/css/ tests/css/base-style.css tests/css/style.css tests/index.html tests/js/ tests/js/report.js tests/packages/ tests/packages/com.foo.tap.trap.rpm.html |
Find the file you want change, press enter and voilà – you are changing content of jar file completely directly.