如何修改駐留在JAR中的配置文件

[英]How to modify configuration file which is residing inside a JAR


I would like to modify the configuration file which is residing inside the JAR. How to modify the configuration properties files which is residing inside a JAR file without Extracting?

我想修改駐留在JAR中的配置文件。如何在不提取的情況下修改駐留在JAR文件中的配置屬性文件?

1 个解决方案

#1


A JAR is just a ZIP file. You can use any tool to manipulate the contents. In Java, there is the class java.util.zip.ZipFile which you can use in combination with other classes of this package to manipulate the contents of the JAR.

JAR只是一個ZIP文件。您可以使用任何工具來操縱內容。在Java中,有java.util.zip.ZipFile類,您可以將其與此包的其他類結合使用來操作JAR的內容。

But even the standard jar tool has options to update a JAR file. Read the documentation for how this can be done.

但即使是標准的jar工具也可以選擇更新JAR文件。閱讀文檔,了解如何完成此操作。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/05/09/72a08f0f40c61cbc495428f613b0c690.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com