如何使用ANT修改jar文件中的文件? [英] How do I modify a file in a jar file using ANT?
本文介绍了如何使用ANT修改jar文件中的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要使用 ANT 更新 jar 文件中的 XML 文件.我必须在文件中搜索一个字符串,如果该字符串存在,则用另一个值替换它.
I need to update an XML file that's inside of a jar file using ANT. I have to search for a string in the file and replace it with another value if that string exists.
推荐答案
粗略的方法.解压 jar
文件,使用 replace
ant 任务,再次压缩文件并将 jar
文件放回去.
A crude approach. Unzip the jar
file, use the replace
ant task, zip the files again and put the jar
file back.
这篇关于如何使用ANT修改jar文件中的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文