views:

26

answers:

1

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.

A: 

I just discover through the debug mode. Launch4j does calculate the right memory amount for you. It's done.

However, it seems that it's impossible to change the memory percentage by using a .ini file:

http://launch4j.sourceforge.net/docs.html#Additional_jvm_options

The .ini file only support jvm parameters. Is this correct?

Winston Chen