如何在Java Netbeans Platform模块化项目中设置VM选项?

问题描述:

我有一个Netbeans Platform模块化项目,而不是常规的Java项目。我想设置VM选项以增加内存,但在属性对话框中,无法对模块化Netbeans平台项目执行此操作。这花费了我很多时间,我仍然没有找到设置VM args的好方法。

I have a Netbeans Platform modular project, not a regular Java project. I want to set VM options to increase memory, but under the "properties" dialog, there is no way to do this for a modular Netbeans platform project. This has cost me huge amounts of time and I still have not found a good way to set the VM args.

有谁知道如何使用Netbeans平台设置VM args模块化项目,在Netbeans 7中编译和运行程序时?鉴于麻烦,我几乎准备放弃Netbeans来创建模块化应用程序。

Does anyone know how to set VM args using a Netbeans platform modular project, when compiling and running the program in Netbeans 7? Given the amount of trouble, I am almost ready to give up on Netbeans to create modular applications.

这很容易,事实上。只需修改 project.properties 文件即可包含以下行:

It is quite easy, in fact. Just modify project.properties file to include the following line:

已编辑:

run.args.extra=-J-Xmx768m

当然,你可以在那里包含任何其他JVM选项。

Of course, you can include any other JVM options there.

享受。