Cannot update JAR properties file using Install4j

I created a new “Configuration” screen that contains several text inputs. My goal is to use these input variables and combine them into a properties file.

I am using version 6.1.6 - so I created the "Modify ZIP file" action for this purpose and placed it under the installer installation file. In the property “Modification action” of the action, I created a new action “Write properties to a file” and inside it, in the “Sources of property definitions” section, I select the “Installer settings” parameter. Then it allows you to bind the variables defined earlier, which makes sense.

My problem is that after starting the installer, the properties file will not receive updates. When opening setup.log, I get the following message:

[ERROR] com.install4j.runtime.beans.actions.properties.WritePropertiesFileAction [ID 1540]: Properties source variable db.database is not an instance of java.util.Map
  • How to define a variable as a map type?
  • I was not sure where exactly to place the action "Change ZIP file" - is it stored in the "Install files" section in order or should I place it directly under the new "Configuration form" that I created?

UPDATE

I set my variable name: "$ {installer: db.database}", which should put it on the card, and now I still get the error message:

[ERROR] com.install4j.runtime.beans.actions.properties.WritePropertiesFileAction [ID 1540]: Properties source variable postgres has not been set
+4
source share
1 answer

in the Sources of Property Definitions section, I select the installer variable parameter.

, .

" " " ". " " , :

A=${installer:A}
B=${installer:B}
...
+2

Source: https://habr.com/ru/post/1688401/


All Articles