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

后端 未结 7 1935
暖寄归人
暖寄归人 2020-12-15 07:10

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

7条回答
  •  Happy的楠姐
    2020-12-15 07:23

    I had this issue and after some digging around and reading a lot of docs I was able to deduce that most of those values were coming from templates in the harness.

    So if you go to your IDE_home/harness/etc/ you will find the "app.conf" file. This file is renamed during a distro build and the "app.conf" becomes your "application name.conf". Edit this file with the default values you would like in you application.

    In my case I replaced the line that read: default_options="--branding ${branding.token} -J-Xms24m -Xmx64m" with default_options="--branding ${branding.token} -J-Xms64m -Xmx512m" as my application was needing more memory. By changing the template I dont have to touch every deployment and change the memory CLI for the VM.

    Hope this helps!

提交回复
热议问题