有没有办法修补jar文件? [英] Is there are way to patch jar files?

查看:146
本文介绍了有没有办法修补jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我向某人发送了一个大罐子或战争文件。我以后可以换一个小部分然后发给他吗?假设我刚刚更改了一个类文件。我将java重新编译成类文件。除了交换旧类文件的新类文件,还有其他我需要做的事情吗?

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 the java for into a class file. Other then exchanging the new class file for the old class file it there anything else I would have to do?

在java中你必须重建整个jar / war文件吗? ?此外,是否有一些开源软件包可用于更新?

In java do you have to rebuild the entire jar/war file? Also, is there some open source package available for doing updates?

推荐答案

接收类文件的人可以简单地将该文件添加到只要他们知道要放入哪个目录,就可以使用jar。如评论中所述,请对签名的罐子感到厌倦。

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

这篇关于有没有办法修补jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆