Most (not all) apps will run when you explicitly execute their code file from terminal as mentionerd above. But you generally don't know that unless it is documented or you just give it a try and see what error results.
In the case of "foobar" I have no idea what the problem might be.
OP: In terminal do the following:
file foobar
where foobar is the code file you were trying to execute. This will indicate what kind of code file it is.
Also
ls foobar
This will show its permissions.
Of course where I say "foobar" you should have the proper pathname to "foobar".
One last thing. Look at the app's Info.plist for a key called LSMinimumSystemVersion. See what the minimum OS version is for that app. Maybe it's a 10.7.x Lion app you are trying to run on 10.6.8 (according to your profile/signature) and it's crashing or just terminating.
Finally, what the heck is "foobar" anyway?