Problem:
I'm having an issue with netbeans and Java. my program needs to be able to communicate 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 participates class, procedure, whatever, to allow more memory allocation?
Answer:
I believe editing netbeans. conf only changes the maximum the JVM that runs the IDE can use. you'll need to change the project configuration for your program (because it probably runs in a different Java VM ).
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"VM options"Text box put your arguments (-Xmx512m
).