Harke
Harke

Reputation: 1289

What is the maximum number of files that can be built at once in Netbeans 7.2

I have a project that has approximately 2000 files (not including library files) that I want to build.

In netbeans 6.9, I was getting "out of memory" error even when I increased the heap to 1 GB. But I got by it by building few packages at a time.

But in netbeans 7.2, I am not able to do this. Even for packages containing 30 files, I sometime get the "out of memory" error.

So, what is the maximum number of files that can be build simultaneously?

How do I get over this problem?

The heap size is 1GB.

UPDATE:

My machine is running Windows 7, 32 bit on a 64-bit machine. Currently, I can't reinstall a 64-bit windows 7. Other configurations, 4 GB RAM. Intel Core 2 quad CPU 2.66Hz.

netbeans conf.:

netbeans_default_options="-J-client -J-Xss2m -J-Xms384m -J-Xmx1024M -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.zip.disableMemoryMapping=true"

Upvotes: 1

Views: 315

Answers (2)

Tan Hui Onn
Tan Hui Onn

Reputation: 424

"out of memory" could be caused by heap size or permgen size. You could use jVisualVM in your jdk/bin to monitor the memory usage.

From your setting, "-J-XX:PermSize=32m" in addition to NetBeans behavior: "Note that default -Xmx and -XX:MaxPermSize are selected for you automatically.". I guess it could be due to PermGen size.

You can try to set "-J-XX:PermSize=128m" (For my case, the startup of NetBeans is faster after I increased the permsize.)

Upvotes: 0

epoch
epoch

Reputation: 16605

I have a java project containing about 2400 source files and it builds fine within 50-60 seconds.

I don't expect Netbeans to have a limitation, Any limitation that you may have is probably hardware/setup related.

I start Netbeans with the following options:

netbeans_default_options="-J-client -J-Xss32m -J-Xms256m -J-Xmx1g -J-XX:PermSize=64m -J-XX:+UseConcMarkSweepGC -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.zip.disableMemoryMapping=true"

Those options are located in install_dir/etc/netbeans.conf

setup:

Core i7 with 10GB ram running jdk1.6.0_33 on Windows 7 64 bit

Upvotes: 1

Related Questions