To make start-up parameters from the command line permanent, you add them to the netbeans.conf file. You may use this plugin to edit the ''netbeans.conf'' file more easily (thanks to Claudio Miranda).
If you want NetBeans to always start with some specific options such as --userdir , --jdkhome , --fontsize , etc., you might be tempted to write a wrapper script around the NetBeans launcher so that you don't have to type them on the command line. A wrapper script will work, of course, but a better way is to put your custom options into the NetBeans configuration file -- netbeans.conf.
There are actually two versions of the netbeans.conf file, a global and a local one.
Global: If you want to change the settings globally for all users using a shared NetBeans installation, modify the global instance of the file. You find it in the NetBeans installation directory:
${nb-install}/etc/netbeans.conf
Local: To make individual changes that will apply only to a specific user, put them into the etc/netbeans.conf file in the user's userdir .
${userdir}/etc/netbeans.conf
The local file does not exist by default! If you don't see a ${userdir}/etc directory you have to create the file yourself. The easiest way to do that is to copy the global netbeans.conf file from the NetBeans installation folder to the local ${userdir}/etc folder, and then make the desired changes.
On Mac OS: Ctrl-click /Applications/NetBeans/NetBeans IDE 6.5.app in the Finder and choose 'show package contents', then browse to /Applications/NetBeans/NetBeans\ IDE\ 6.5.app/Contents/Resources/NetBeans/etc/netbeans.conf.
On Windows: C:\Program Files\netbeans\etc\netbeans.conf
On Linux the installer lets the user choose where you want to install NetBeans. You may find it under /home/yourname/netbeans/etc/netbeans.conf or /opt/netbeans/etc/netbeans.conf.
The netbeans.conf file can include the following entries:
Any line in netbeans.conf starting with '#' is a comment. Comments are ignored during processing.
The startup options and settings passed into NetBeans via the command-line and the ones found in configuration files may overlap. The conflicting options are resolved by the following rules:
A typical content of the global netbeans.conf file may look like this:
# ${HOME} will be replaced by JVM user.home system property
netbeans_default_userdir="${HOME}/.netbeans/6.5"
# Options used by NetBeans launcher by default, can be overridden by explicit
# command line switches:
netbeans_default_options="-J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m
-J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true"
# Default location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_10"
# Additional module clusters, using ${path.separator} (';' on Windows or ':' on Unix):
#netbeans_extraclusters="/absolute/path/to/cluster1:/absolute/path/to/cluster2"
Applies to: NetBeans 4.0, 4.1, 5.0, 5.5, 6.0
Platforms: All