Is there are way to patch jar files?

后端 未结 7 1514
陌清茗
陌清茗 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:49

    If you have your old and new jar file, you can create an xdelta of both and send only the delta file to your client, which should be much smaller than the whole jar file, if you changed only one class of many. This should work for signed jars, too, but requires that both sender and receiver have the xdelta program (or be able to install it).

    And of course, you have to create the new jar first (but this can be done by the methods already mentioned by the other answers).

提交回复
热议问题