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:
From the Window menu, select
The Preferences dialog opens.
The File Associations pane appears:Figure 1. File extensions list
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 2. Adding a file extension
- Beside File type, enter the appropriate file extension, preceded by an asterisk.
The new file type appears selected in the File types list.
Click the Add button next to the
Associated editors list.
The Editor Selection window appears:Figure 3. Selecting an editor
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.
Select your preferred editor for the selected file format, then click
Your editor appears in the Associated editors list.
- With the editor selected, click Default to make it your editor of choice.
- Repeat from Step 3 to set up additional file-editor associations if desired.
When all desired associations have been set up, click
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.