I’m having an issue with netbeans and Java. My program needs to be able to cope with large files being uploaded via an arraylist. So I used -Xmx512m to increase the maximum heap size via the netbeans.conf file.
I know that netbeans is catching the change, and I’ve restarted multiple times to make sure it is. Still, my program continues to crash with a Java heap space memory error when the total memory parameter is only 66650112 bytes; that is, 64M-ish.
How can I force this particular class, procedure, whatever, to allow more memory allocation?
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).