NetBeans : some useful tips and links
By Jonathan Lermitage on Monday 11 June 2012, 19:32 - NetBeans IDE - Permalink
Here is a list of some tips and links for NetBeans. This page will be updated as often as possible :)
Tips : NetBeans start-up parameters
It is about parameters you can add to the etc/netbeans.conf
properties file (located in the NetBeans installation directory), in the netbeans_default_options
property. Additional parameters can be found at the NetBeans : Tuning JVM switches for performance web-page.
Warning : you've probably heard people advising to set the same value to the Xms and Xmx parameters, in order to avoid the JVM to manage the heap size (typical explanation : each time the JVM increases the heap size it must ask the OS for additional memory, which takes time). This is a bad idea ! JVMs are designed to perform optimizations according to the Xmx/Xms ratio (and some other parameters). Assign the same value to these switches is unnecessary (the only gain would be pointless for the JVM to allocate more memory, but it must be recognized that this task consumes only very limited resources and occurs infrequently). In addition, you will notice an interesting thing: since Java7 and the G1
garbage collector, the JVM will detect if you set the same value to the Xms and Xmx switches, and will replace your values by its own. The Xms = Xmx
tip is definitely unnecessary when G1 is enabled ;)
Please note that it concerns Sun/Oracle HotSpot JVM only. I have not checked the behavior of Oracle JRockit JVM, nor IBM J9 JVM.
Internet connection problems ? (if you cannot download plugins, check for updates, etc)
If your Operating System uses IPv6, you can try to ask NetBeans to use IPv4 only. Add the following switch : -J-Djava.net.preferIPv4Stack=true.
How to place the status line in the menu bar
Add the following switch : -J-Dnetbeans.winsys.statusLine.in.menuBar=true.
Here is an example screenshot :

You will save some vertical space.
How to increase NetBeans UI font size
Add the following switch : --fontsize 12 (replace 12 by a size of your choice).
How to use the System's proxy configuration
Add the following switch : -J-Djava.net.useSystemProxies=true.
Useful links
- NetBeans plugins developers : how to sign your NBM files / don't forget to check plugins quality criteria
- how to download a module from the NetBeans Update Center manually (you can easily make it work with newer Update Centers)
- NetBeans tutorials and samples
- NetBeans performance : Tuning JVM switches
- NetBeans User Guide : Mercurial (HG) guide and Mercurial Queues Guide
- NetBeans User Guide : Subversion (SVN) guide
- NetBeans User Guide : Git guide
- Netbeans User Guide : Concurrent Versions System (CVS) guide
Latest comments