Associate file extensions with applications

You can associate file extensions with applications so that Eclipse knows how to open them.

This may be useful, for example, if you want to open ZIP or Microsoft Word files when using Eclipse. To associate file extensions with your preferred editors:

  1. From the Window menu, select Preferences.
    The Preferences dialog opens.
  2. Select General > Editors > File Associations.
    The File Associations pane appears:
    Figure: File extensions list


  3. If the file extension does not appear in the File types list, click the Add button next to the File types list.
    The Add File Type dialog box appears:
    Figure: Adding a file extension


  4. Beside File type, enter the appropriate file extension, preceded by an asterisk.
  5. Click OK.
    The new file type appears selected in the File types list.
  6. Click the Add button next to the Associated editors list.
    The Editor Selection window appears:
    Figure: Selecting an editor


  7. Do one of the following:
    • To display programs integrated with the Eclipse IDE, such as the browser, select Internal Editors.
    • To display programs available through your system, select External Programs.
  8. Select your preferred editor for the selected file format, then click OK.
    Your editor appears in the Associated editors list.
  9. With the editor selected, click Default to make it your editor of choice.
  10. Repeat from Step 3 to set up additional file-editor associations if desired.
  11. When all desired associations have been set up, click OK.
    The next time you open a file in Eclipse with one of the configured extensions, the selected editor will be used. If you have more than one editor associated with a given file type, they will appear as options when you right-click these files and select Open with.