Modifying a file inside a jar
You can use Vim:
vim my.jar
Vim is able to edit compressed text files, given you have unzip
in your environment.
You can use the u
option for jar
From the Java Tutorials:
jar uf jar-file input-file(s)
"Any files already in the archive having the same pathname as a file being added will be overwritten."
See Updating a JAR File.
Much better than making the whole jar all over again. Invoking this from within your program sounds possible too. Try Running Command Line in Java