Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to set Eclipse as the default program for open certain types of files? I'd like to set it as the default program for editing .java and .js files.

share|improve this question
I can open the file in Eclipse on Ubuntu using this command: eclipse (path of file I'm trying to open) – Anderson Green Jul 29 '12 at 1:08
Further information on this topic is available here:… – Anderson Green Jul 29 '12 at 1:09
This tutorial explains how to do this on Mac OS X:… – Anderson Green Jul 29 '12 at 1:13

The normal way of setting a default program to open a certain type of files would work:

Right click a certain .java / .js file (any file of the type you want Eclipse to open by default) -> Open With -> Choose default program -> Choose Eclipse (you may need to browse and find the Eclipse executable file (the launcher)).

Do this for .java and .js files and you're good to go.

share|improve this answer
Is this specific to a certain type of operating system, or does it apply to all operating systems? – Anderson Green Jul 29 '12 at 0:13
Also, where is the Eclipse executable usually located on Windows? – Anderson Green Jul 29 '12 at 0:15
This is specific for Windows (all versions). As for Linux, the "Open with" option should be in the Properties tab after you right-click a certain file. As for the Eclipse executable file (the launcher), I suggest you search your computer for "eclipse.exe", as its location depends on where you saved the Eclipse download package to. – amiregelz Jul 29 '12 at 0:17
On Linux (Ubuntu 12.04), Eclipse doesn't even show up under the list of installed applications. – Anderson Green Jul 29 '12 at 0:20
I think the reason why it doesn't show up under the list of installed applications is because Eclipse is not installed - when I installed the latest version of Eclipse few weeks ago, it was downloaded as a .zip file and all I needed to do was unzip it and I was able to use Eclipse. The folder it was unzipped to is the folder where the Eclipse launcher is located in my computer, and no installation was ever required. – amiregelz Jul 29 '12 at 0:26

Install this plugin on eclipse :

share|improve this answer
According to the description at the site, this does the opposite of what was requested. The question asks to define it specifically for .java and .js files. Your plug-in is for any text files that do not have an assigned default editor. But in general, please see… for guidance on recommending software. – fixer1234 Aug 19 '15 at 9:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .