3

In Intall4j, at the end of installation I just want to initialize something by executing a command line like:

java -jar filename.jar

How can I archive this task with install4j?

Thanks

gprathour
  • 14,813
  • 5
  • 66
  • 90
Nhat Nam NGUYEN
  • 1,252
  • 11
  • 15

1 Answers1

3

Add a "Run executable or batch file" action to the "Installation screen" and set the following properties:

"Executable" property: ${installer:sys.javaHome}/bin/java

"Arguments" property: -jar; filename.jar (in the editor one argument per line)

Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
  • Note that, at least in version 6.x of Install4J, when I had a space after the argument it failed with a Java error when attempting to run the command. – Timothy Vogel Jan 11 '21 at 01:24