如何在 Install4j 中访问属性文件形式的 JAR(存档)?
How to access properties file form JAR(archive) in Install4j?
在我的项目 jar 中,我有 config.properties 文件,其中包含安装目录 path.Now,安装时如果用户更改安装目录,我需要使用选择的新路径更新配置文件用户。
为此目的使用 "Modify a ZIP file" 操作。在动作的 "Modification actions" 属性 中,添加一个 "Write properties to file" 动作并确保它的 "Merge into existing file" 属性 和它的 "Update existing keys" 子 属性 被选中。在 "Property definitions" 属性 您可以输入键值对,例如
installerDir=The new value
在我的项目 jar 中,我有 config.properties 文件,其中包含安装目录 path.Now,安装时如果用户更改安装目录,我需要使用选择的新路径更新配置文件用户。
为此目的使用 "Modify a ZIP file" 操作。在动作的 "Modification actions" 属性 中,添加一个 "Write properties to file" 动作并确保它的 "Merge into existing file" 属性 和它的 "Update existing keys" 子 属性 被选中。在 "Property definitions" 属性 您可以输入键值对,例如
installerDir=The new value