Is there are way to patch jar files?

后端 未结 7 1523
陌清茗
陌清茗 2021-01-01 18:32

Suppose I sent a large jar or war file to someone. Could I later just change one small section and send that to him? Suppose I just changed one class file. I recompiled t

7条回答
  •  不思量自难忘°
    2021-01-01 18:51

    The person receiving the class file could simply add that file to the jar as long as they know which directory to put it in. Be weary of signed jars, as noted in the comments.

    jar uf foo.jar foo.class
    

    http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/jar.html

提交回复
热议问题