-2

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?

3
  • 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
5

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.

0
2

Eclipse .app is a directory. Use this instead:

cd Desktop/Eclipse/Eclipse.app
./Eclipse
1

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

0

To do so, use open. Not only you could use open on apps, but also other files. Such as, open Something.jpg.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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