IDE Startup Parameters

You can pass startup parameters to the IDE launcher using the IDE-HOME/etc/netbeans.conf file. The launcher reads this file prior to parsing the command-line options, including any parameters you have added.

The following table defines the switches 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 JavaTM 2 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. Choose Help > About. Then click the Detail Tab and look at the User Dir field.

-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.

-J-Dorg.netbeans.spi.java.project.support.ui.packageView.USE_TREE_VIEW=true

Displays packages in the Project window in a directory-based view rather than a package-based view.

See Also
About Configuring the IDE
Using the Options Window

Legal Notices