Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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: google.com/… –  Anderson Green Jul 29 '12 at 1:09
    
This tutorial explains how to do this on Mac OS X: bewarethepenguin.blogspot.com/2010/08/… –  Anderson Green Jul 29 '12 at 1:13
add comment

1 Answer

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
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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