java.lang.OutOfMemoryError: Java heap space with NetBeans

Changing the heap size in netbeans.conf only changes the heap for NetBeans itself, not for applications run through NetBeans.

The correct way is to right-click on the project and select “Properties” and then “Run”; there you can set the VM options appropriately (-Xmx256m, for instance). It should look something like this:

setting the heap size
(Thanks to VonC for finding this picture.)

Leave a Comment