edvin / fxlauncher

Auto updating launcher for JavaFX Applications
Apache License 2.0
715 stars 107 forks source link

How to set heap space application #192

Open demkrc opened 4 years ago

demkrc commented 4 years ago

Hi,

i'm trying to set jvmOptions, but not working. I add argument in install phase with argument. it's correct?

   <execution>
                    <id>installer</id>
                    <phase>install</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <configuration>
                        <executable>${java.home}/../bin/javapackager</executable>
                        <arguments>
                            <argument>-deploy</argument>
                            <argument>-native</argument>
                            <argument>-outdir</argument>
                            <argument>${app.installerdir}</argument>
                            <argument>-outfile</argument>
                            <argument>${app.filename}</argument>
                            <argument>-srcdir</argument>
                            <argument>${app.dir}</argument>
                            <argument>-srcfiles</argument>
                            <argument>fxlauncher.jar</argument>
                            <argument>-appclass</argument>
                            <argument>fxlauncher.Launcher</argument>
                            <argument>-name</argument>
                            <argument>${project.name}</argument>
                            <argument>-title</argument>
                            <argument>${project.name}</argument>
                            <argument>-vendor</argument>
                            <argument>${app.vendor}</argument>
                            <argument>-Bidentifier=${project.name}</argument>
                            <argument>-BappVersion=${app.version}</argument>
                            <argument>-Bicon=${project.basedir}/package/windows/${project.name}</argument>
                            <argument>-v</argument>
                            <argument>-BjvmOptions=-Xms1024m</argument>  <!-- initial heap -->
                            <argument>-BjvmOptions=-Xmx2048m</argument> <!-- heap max a 2gb -->
                            <argument>-BjvmOptions=-XX:+UseG1GC</argument> <!-- gc optimizer -->
                            <argument>-BjvmOptions=-XX:+UseStringDeduplication </argument><!-- string ram -->
                        </arguments>
                    </configuration>
                </execution>

My application start, but with 256mb max heap. Thanks for your help