Making the visual editor the default Java editor

By default, Java™ classes are opened in a source code editor. You can make the visual editor the default Java editor for all .java files.

About this task

The workbench associates file types with certain editors so that the proper editor opens when you launch a file. For Java files with a .java file extension, the default editor is the basic Java source code editor. Unless you change the default editor in your workbench file association preferences, Java files do not automatically launch in the visual editor.

To make the visual editor the default application for .java files:

Procedure

  1. Click Window > Preferences to open the Preferences window.
  2. Expand the Workbench node and select File Associations.
  3. In the File types list, select *.java.
  4. In the Associated editors list, select Visual Editor and click Default.

Results

Note: Changing the default Java editor affects what happens when you open any .java file, including JSP files and servlets.

Feedback