FaqOutofMemoryOnCompile
I get an OutOfMemoryError while building a project having more than 6000 source files. What do I do?
You need to increase the memory allocated to the compiler. In order to do this:
- Right click on the project node in the Projects window and select Properties
- In the project properties dialog, click on Build | Compiling
- In the Additional Compiler Options text box, enter the -Xmx and optionally -Xms switches as needed (for example, -J-Xms=128m -J-Xmx=512m). For JDK 6, refer to http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html.
- Click OK in the dialog
- Make sure the external javac compiler will be used, by adding the following line to nbproject/project.properties from the Files tab:
build.compiler=extJavac
That should resolve the issue.
Applies to: since NetBeans 5.0
Platforms: All