3

I'm using Install4J 5.0.8

Under 'Launcher' --> '5. VM options file' --> 'Generate with the following contents'

Some of the variables are expanded after install (such as my 'Compiler variables'), but the ${installer:sys.contentDir} remains unexpanded?

For example:

-Xmx2048m
-Duser.home=${installer:sys.contentDir}/tmp

Here is the XML snippet:

<vmOptionsFile mode="content" overwriteMode="4">
 <content>-Xmx2048m
  -Duser.home=${installer:sys.contentDir}/tmp
 </content>
</vmOptionsFile>

Is there an alternative variable for the install root, as I would like to avoid relative paths (./tmp).

Paul Allen
  • 33
  • 3

1 Answers1

1

Installer variables in VM parameters are replaced by the main class, which is too late for some VM parameters.

You can use a "Replace installer variables in text files" action in the installer to perform this replacement at installation time.

Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
  • Thank you. Adding a "Replace installer variables in text files" in the Installer steps worked. I had to manually specify the path to the vmoptions file. The "..." button did not list the vmoptions file. – Paul Allen May 07 '20 at 08:27