IDE Startup Parameters

See Also

You can pass startup parameters to the IDE launcher using the IDE-HOME/etc/netbeans.conf file or on the command line. The launcher reads the netbeans.conf file prior to parsing the command-line options, including any parameters you have added. The netbeans.conf file contains details on some of the available startup switches, including switches to modify the heap size.

The following table defines some of the switches that you can use with the IDE.

--help (or -h)
Prints descriptions of common startup parameters.
--jdkhome jdk-home-dir
Uses the specified version of the JDK instead of the default JDK. By default on Microsoft Windows systems, the IDE's launcher looks into the registry and uses the latest JDK available.

You should back up your user directory before you upgrade the JDK that the IDE uses. If you later need to revert to the previous JDK, switch to the backed up user directory to ensure that you do not lose any settings.

To switch the IDE's user directory, use the --userdir switch that is detailed below.

--cp:p additional-classpath
Prefixes the specified class path to the IDE's class path.
--cp:a additional-classpath
Appends the specified class path to the IDE's class path.
--open file
Opens the file in the Source Editor.
--open file:line number
Opens the file in the Source Editor at the specified line.
--laf UI-class-name
Selects the given class as the IDE's look and feel. The following are two examples of look and feel classes.
  • com.sun.java.swing.plaf.motif.MotifLookAndFeel
  • javax.swing.plaf.metal.MetalLookAndFeel

--fontsize size

Sets the font size, expressed in points, in the IDE's user interface. If this option is not used, the font size is 11 points.
--locale language[:country[:variant]]
Activates the specified locale.
--userdir userdir
Explicitly specifies the user directory, which is the location where user settings are stored.

If this option is not used in UNIX® environments, the user directory is set in the HOME directory by default. If this option is not set on Microsoft Windows systems, the user directory is the one you specified when you first launched the IDE.

You can determine the current user directory in the About dialog box.

--cachedirpath
Specifies the directory to store the user cache.
-Jjvm-flags
Passes the specified flags directly to the JVM software.
-J-Dsun.java2d.noddraw=true
Prevents the use of DirectX for rendering. This switch might prevent problems that occur on some Microsoft Windows systems with faulty graphics cards.

For information about your userdir and cachedir, see the following document.

For information about performance-related startup switches, see the following document.

For information about modifying the JVM heap size, see the following FAQ on the NetBeans wiki.

See Also
About Configuring the IDE
Using the Options Window

Legal Notices