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.


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.

  • 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 : https://marketplace.eclipse.org/content/default-text-editor

  • 3
    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 meta.superuser.com/questions/5329/… for guidance on recommending software. – fixer1234 Aug 19 '15 at 9:26

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.