Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I can't launch eclipse from either terminal or gmrun but I can do so using Applications -> Programming -> Eclipse.

Here are the screenshots:

1) Using Gmrun: I can see that gmrun is recognizing the eclipse command but when I enter it, nothing happens.

enter image description here

2) Using Terminal: when I type eclipse, I get the following message:

terminal

Thanks!

share|improve this question

3 Answers 3

Ubuntu has its own directories from which it will check for applications (like /usr/bin). So If you just downloaded eclipse to /opt then of course it won't be recognized. If you want it to be recognized, you have two options, either install from Ubuntu standard repos (with disadvantage missing latest version) or install your eclipse on those directories / symlink it (both unrecommended).

BTW why not cd /opt/eclipse and just run ./eclipse?

share|improve this answer
    
I want to able to run eclipse from run dialog box..You think thats not possible with current setup? –  javanoob Sep 30 '11 at 13:28
    
You have to add symlink that will pretend as if eclispe runs from "system" directories. For example you can create symlink of eclipse executable in /usr/local/eclipse. For more on symlinks check unixtutorial.org/2008/02/unix-symlink-example –  Stefano Sep 30 '11 at 17:09
    
@Stefano These are not the only two options. As lol xD's answer details, you can add the directory that contains the eclipse binary to the PATH environment variable. This method is quite standard, quick, and elegant. –  Eliah Kagan Aug 10 '12 at 22:36
    
You are right! I think finding a PPA with latest eclipse version might be better option. I remember one time I saw it somewhere! –  Stefano Aug 13 '12 at 9:11

Or maybe you could try to change your $PATH environment variable in the .profile file in your home directory? Like adding a line export PATH=$PATH:/opt/eclipse to the file (at or near the end of the file).

share|improve this answer

Do the following steps to fix it. Assume you extracted eclipse in /opt/eclipse. Your eclipse executable's path is /opt/eclipse/eclipse

Fix permission

sudo chmod -R a+x /opt/eclipse

Make a link of eclipse (executable)

sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse

Again fix the permission

sudo chmod a+x /usr/local/bin/eclipse

Check in terminal to ensure that system detects eclipse which eclipse

output: /usr/local/bin/eclipse

Now you can run eclipse by typing eclipse in terminal or search in gmrun (ATL+F2)

share|improve this answer
    
This thread is little bit older. but answer it for future reference. –  shantanu Jan 31 at 6:54
    
It says; chmod: cannot operate on dangling symlink [path] –  C_B Jun 9 at 9:04

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.