Changing the default Java editor

Eclipse provides two editors for editing Java source files: a text-based editor and a Visual Editor. By default, when you create a new class, the non-visual editor opens. When you open an existing .java file, the editor that you last used for editing that file opens.

To change the default editor that opens for .java files:

  1. From the main menu bar, select Window > Preferences.
  2. In the Preferences window, expand the Workbench category and select File Associations.
  3. Select .java from the list of file types and select the editor that you want to set as default, then click the Default button.

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

file association preferences

Related concepts
Visual Editor for Java

Related tasks
Launching the Visual Editor for Java

(C) Copyright IBM Corporation 2000, 2003. All Rights Reserved.