问题
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