In Run->Run Configuration find the Name of the class you have been running, select it, click the Arguments tab then add:
-Xms512M -Xmx1524M
to the VM Arguments section
In Run->Run Configuration find the Name of the class you have been running, select it, click the Arguments tab then add:
-Xms512M -Xmx1524M
to the VM Arguments section