IDE – Netbeans – Restore ‘Refresh Folder’ Option from Right Click Menu


Recently I went back to netbeans after giving Aptana a try, and so far things are going pretty smoothly. Except for one small issue, the right mouse click to ‘Refresh Folder’ option is missing. After some googling I came across a site┬áthat describes how to enable this feature.

Basically you need to disable ‘Enable auto-scanning of sources’ checkbox under: Tools -> Options -> Miscellaneous -> Files. After you do this, the ‘Refresh Folder’ option will magically appear. Thanks to the author for making this info publicly accessible.

IDE – Netbeans – JVM Performance Tuning – Config Settings


I’ve recently switched from Zend 5.5 to Netbeans (v7.0) . I’ve tried Eclipse, Eclipse PDT, and Zend Studio 8, but didn’t care much for any of them. Netbeans is tolerable, so I decided to focus on it as my main IDE, as such I had to research some JVM performance tuning because it was dog slow by default.

The default config looks like:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=384m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true"

Our goal is to increase the min and max memory limits so we can handle larger code bases. The flags you want to add (manually):

Min Heapsize (2GB): -J-Xms2048m

Max Heapsize (4GB): -J-Xmx4096M

Also, as noted in the config file, enable the following flags:

-J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled

So your final config should look like:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=384m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Xms2048m -J-Xmx4096m -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled"

IBM explanation of some of the min/max settings:

Also, if you have symlinks to deeper libraries, be sure to add the paths to said libraries to the ‘Ignored Folders’ under project properties, this will help reduce un-necessary scanning.

Update (1.27.2012)

There are a few more flags you should consider adding for your netbeans config. There is a new Garbage Collector as of 7.1 which really improved the performance of my netbeans install. You can read more @ Netbeans JVM Tuning. I appended the following flags at the end of my `netbeans_default_options` string (note: remove -J-XX:+UseConcMarkSweepGC because it will be replaced with UseParallelGC):

-J-Xverify:none -J-XX:+UseAdaptiveSizePolicy -J-XX:+UseParallelGC
Go to Top