How to pass JVM arguments to a native JavaFX 2 application created with Inno Setup

白昼怎懂夜的黑 提交于 2019-12-24 15:06:14

问题


I have a JavaFX 2 desktop application. I've used javafx-maven-plugin and Inno Setup to create a native bundle for Windows (.exe installer).

When I install the application on Windows Server 2008, I get an out of memory exception, because of the low heap size.

How can I pass JVM arguments to increase the heap size (-Xmx) in this scenario?

Is there any way to specefy jvm arguments to be called when creating the native bundle with Inno Setup?


回答1:


There is no way to do in via Inno Setup, because it just creates an installer for your application.

However, you can use the jvmArgs for the goal javafx:native. Add them in the configuration tag of the javafx-maven-plugin to set the Xmx, Xms or any other JVM arguments.

<configuration>
    <jvmArgs>
        <argument>-Xmx2g</argument>
        <argument>-Xms256m</argument>
    </jvmArgs>
</configuration>


来源:https://stackoverflow.com/questions/28720003/how-to-pass-jvm-arguments-to-a-native-javafx-2-application-created-with-inno-set

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!