Java heap space in netbeans

Source: Internet
Author: User
Tags netbeans

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).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.