如何将JVM参数传递给使用Inno Setup创建的本机JavaFX 2应用程序 [英] How to pass JVM arguments to a native JavaFX 2 application created with Inno Setup

查看:142
本文介绍了如何将JVM参数传递给使用Inno Setup创建的本机JavaFX 2应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个JavaFX 2桌面应用程序.我已经使用javafx-maven-plugin和Inno Setup为Windows(.exe安装程序)创建本机包.

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).

在Windows Server 2008上安装该应用程序时,由于堆大小较小,因此出现内存不足异常.

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

在这种情况下,如何传递JVM参数来增加堆大小(-Xmx)?

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

使用Inno Setup创建本机捆绑包时,是否有任何方法可以指定要调用的jvm参数?

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

推荐答案

无法通过Inno Setup进行操作,因为它只是为您的应用程序创建了一个安装程序.

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

但是,您可以将 jvmArgs 用作目标 javafx:native .将它们添加到javafx-maven-plugin的配置标记中,以设置Xmx,Xms或任何其他JVM参数.

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>

这篇关于如何将JVM参数传递给使用Inno Setup创建的本机JavaFX 2应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆