I use eclipse IDE and it happens once in a while. When I face the issue "Could not find the mail class Program will exit", I recreate a new project and copy my java source programs to new project, then it works again.
I want to find the root cause instead of creating a new project/copy java program ....
1) What kind of project did you create in Eclipse?
2) What is the full project relative path to the class with the main() method?
3) It appears that the app will run at least once and then after a while you get the "could not find main class" error. What do you do to the project between the time that it runs and the time that it doesn't run? Do you edit files? Do you recompile? Do you add/remove things?