Kev
Kev

Reputation: 16321

Opening a file in Eclipse that is associated with another program

I am trying out Eclipse, specifically:

Eclipse Standard/SDK

Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600

...on Windows 7 with Java 8 update 45 installed.

I have .sql files associated with a program other than Eclipse, and want to keep it that way. However, I would like to open one of them in Eclipse. So, with Eclipse open, I do the standard File->Open File, browse to the file I want, and open it by clicking the Open button (or double-clicking the file.)

I expect it to open in the program I called it from, since this is how it works in every other program I have ever seen.

Instead, it opens it in the associated program.

How can I keep the association but try out Eclipse for these files? Or use it for one project but not in general for this type of file?

Upvotes: 2

Views: 2181

Answers (4)

Jaxon wei
Jaxon wei

Reputation: 9

Right click on the file in Package/Project Explorer, then select "Open With" -> "Other...", last, select "external programs" and select your program from the list.

Upvotes: 0

sam.pan
sam.pan

Reputation: 76

  1. click eclipse "window"=>Preferences
  2. input "File Associations" search it and click
  3. find your *.sql type and selected,you will see the Associations Editor
  4. last,you select on and click default button

Upvotes: 3

Saumil
Saumil

Reputation: 2517

A quick solution to you problem is open your .sql file with notepad by right clicking on it and copy all the contents. Now create a new file in Eclipse with the same name and paste all the contents in it. If you make any changes you can reverse this process to make the changes reflected on your original file.

Upvotes: 0

kostya
kostya

Reputation: 9559

Right click on the file in Package/Project Explorer, then select Open With \ Text Editor (for example)

Upvotes: 0

Related Questions