Running NetBeans with an Option
By Petr on Feb 07, 2011
Sometimes I ask people to run Netbeans with an option to provide more log messages and help me to find out a solution of a problem in this way. NetBeans doesn't log all messages and if I want to obtain more detail messages to look what happen, the IDE has to be run with an option that set appropriate log level for certain class or classes. NetBeans uses standard Java Logging API and for example, when I want to more detail log from code that take care about FTP support, it's enough to run NetBeans with option (-Dorg.netbeans.modules.php.project.connections.ftp.level=FINE in this case) that set the log level for appropriate class/classes in the right value.
Basically there are two ways how to achieve this. From command line or add the option to the configuration file.
The first one is simple for people who run Netbeans from command line. I have already wrote about a useful option --userdir, that allows also run more NetBeans with different settings. So from command line on unix based systems
or on Windows
The -J switch says to the NetBeans launcher to pass the property to the virtual machine.
The second way how to add an option is to write it into netbeans.conf file that is located in etc folder in your NetBeans instalation place. The property just add to the netbeans_default_options. You have to add again the -J switch, if you want to pass it to the VM. Now you can run the ide as usually from GUI and it will be run with the option.