Java heap space in netbeans.. but I’ve increased the heap size already!

I think you just configured the maximum heap size of netbeans IDE itself and not your program.

Go to your project “properties“, select “Run” category. In the “VM Options” text box put your arguments (-Xmx512m).

Leave a Comment