Terminal : needs full path to execute a command
bash in Terminal uses the content of $PATH to look for executables. Usually . (for the current directory) is not part of $PATH (primarily for security reasons), to run commands in the current directory type ./myapp.