The Maven plugin for Launch4j lets you generate the Launch4j
executable as part of the Maven build process. It supports Maven 2.0.4
and Launch4j 3.x.
See here
This is a sample of the configuration that you can try to use:
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<executions>
...
<configuration>
...
<jre>
<!-- Specify path or minVersion or both. -->
<path>bundled JRE path (%VAR%)</path>
<bundledJre64Bit>true|false</bundledJre64Bit>
<bundledJreAsFallback>true|false</bundledJreAsFallback>
<minVersion>x.x.x[_xx]</minVersion>
<maxVersion>x.x.x[_xx]</maxVersion>
<jdkPreference>jreOnly|preferJre|preferJdk|jdkOnly</jdkPreference>
<runtimeBits>64|64/32|32/64|32</runtimeBits>
<!-- Heap sizes in MB and % of available memory. -->
<initialHeapSize>MB</initialHeapSize>
<initialHeapPercent>%</initialHeapPercent>
<maxHeapSize>MB</maxHeapSize>
<maxHeapPercent>%</maxHeapPercent>
<opt>text (%VAR%)</opt>
</jre>
...
</configuration>
</execution>
</executions>
</plugin>