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.

I'm using a bash shell in Mac OS X. I have a 'Eclipse' folder on my Desktop with the launcher icon in it, and I'm trying to open the app like this:

cd Desktop
cd Eclipse
Eclipse.app

But this gives me an error: -bash: Eclipse.app: command not found

Why?

share|improve this question

migrated from stackoverflow.com Jul 4 '12 at 19:52

This question came from our site for professional and enthusiast programmers.

1  
What does not working mean? Crash? Error message? Daemons flying out of your nose? –  H2CO3 Jul 4 '12 at 18:58
    
Oh yeah sorry, i get a command not found: -bash: Eclipse.app: command not found –  JBoy Jul 4 '12 at 19:00
    
OK see my answer. –  H2CO3 Jul 4 '12 at 19:00

3 Answers 3

In Mac you should use open. It's not only help you open the application but it also open specific file extension with the default application. Like open <pdf> will activate preview.

For more information man open

share|improve this answer

You're trying to launch an OS X app.

In OS X only, you use the open command for this:

cd Desktop/Eclipse
open Eclipse.app

open is much more versatile than this, and will also open files using the associated program.

To learn more about open, type this in the Terminal:

man open

As already mentioned, open is OS X specific.

share|improve this answer
    
Very useful, thank you pb2q, –  JBoy Jul 4 '12 at 19:04

Eclipse .app is a directory. Use this instead:

cd Desktop/Eclipse/Eclipse.app
./Eclipse
share|improve this answer

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.