posted 13 years ago
It's simply not possible. JAR (and ZIP, which is the basis of JAR) doesn't allow actual writing into it. Any tool that apparently allows you to do this will create a temporary file with the new contents, then rename the temporary file to the old file.
With JAR files this is going to be even a bit harder, since the JVM locks the JAR files it loads. You can't modify or replace them until after the JVM exits.