When deploying a desktop application to a large group of customers it is nearly impossible to provide a single "good" value for maximum heap size. One solution would be to add custom logic to install4j-generated installer to calculate the "good" value and let the user either choose it or change to something else.
It might be more useful to provide a variant of -Xmx option (or indeed any other options that take memory size, such as -Xmn -Xms) that would take percentage of physical RAM.
An obvious suggestion to use -Xmx<number>% might run afoul of some platform/shell idiosyncrasies, so perhaps -Xmx<number>pct might be better.