views:

46

answers:

1

Hi, I recently switched to Eclipse (Helios) for my programming needs, and I like it very much.

There is just on thing that is driving me crazy, how can I launch (compile and run) my code into the native mac osx terminal.

I tried creating an "external tools configuration", but that just starts the terminal without outputting the application.

What I do now is right-click on the binary in the Project Explorer and then "Open With" and then "Other" and then I pick the terminal app from the list. But this solution is driving me nuts.

Please help.

+1  A: 

It's all about defining the External Tool correctly.

For example, the following should work if your selected file is a Unix executable.

  1. Open a new External Tool configuration.
  2. Set the location to /usr/bin/open
  3. Set the arguments to -a /Applications/Utilities/Terminal.app ${selected_resource_loc}

This should work. You could improve it further. You could even write an AppleScript that would do that and run it using osascript.

zvikico
The ${selected_resource_loc} doesn't work, I added the complete path name and that does work. Thank you.
bing