How to increase the java heap size in netbeans?

You can set it in NetBeans in the project properties -> Run -> VM options

  1. Right click on your project “Properties
  2. Select “Run” category.
  3. Enter your arguments(-Xmx512m) in the “VM Options” text box.

Example: Putting -Xmx512m in the “VM Options” text box gives 512Mb maximum heap size to your Java program.

Leave a Comment