In Launch4j, the memory configuration can be based on the percentage of the available memory size. For example:
<maxHeapPercent>50%</maxHeapPercent>
specifies that the maximum heap size will be 50% of the available memory.
However, I wonder if Launch4j calculate the memory by itself or actually reuse the JVM parameter -XX:MaxHeapFreeRatio? If so, the maximum memory will be 1Gb, according to the page: http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html#par_gc.ergonomics.default_size. This also means that I have to look for some other tools.