MTA stands for Mail Transfer Agent, I think, so apparently the app runs, but cannot use its email services.
I recommend that when running Java via cron that you place the actual Java command in a script file and let cron run the script instead. It makes things a little simpler. You can run the script directly for debugging purposes (which is something I spent too much time doing just the other day!).
An IDE is no substitute for an Intelligent Developer.