Is there are way to patch jar files?

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

    You can copy the modified .class file this way.

    jar uf test.jar com\test\Test.class
    

    If there is a logical way for you to separate out your components in individual jar files then I would create a jar file per component type. That way you will not have re-distribute everything back to the client. For example - take a look at how Spring 3 has the components separated out.

提交回复
热议问题