How can I set VM options in a Java Netbeans Platform Modular Project?

Makoto picture Makoto · Jul 11, 2011 · Viewed 32.8k times · Source

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.

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.

Answer

JB- picture JB- · Jul 11, 2011

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

Edited:

run.args.extra=-J-Xmx768m

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

Enjoy.