如何修改使用ANT一个jar文件的文件? [英] How do I modify a file in a jar file using ANT?

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

问题描述

我需要更新的XML文件是使用ANT一个jar文件里。我要搜索文件中的字符串,如果该字符串存在与另一个值替换它。

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 文件,使用替换 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屋!

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