When this problem occurs, it should be divided into two cases, the first is when you want to run a file without the main function, the second is the class you want to run when there is a main function
The general solution to both of these problems is to configure the operation first. It can also be a problem with the program's main function.
In the first case, you find a class that has a main function and then run it, of course, to run successfully, then the equivalent to run the configuration, and then you want to
The running class is also equivalent to having a configuration that you can run.
For example, I encountered this problem when I want to run the class file Chinese does not have the main function
That's when I find another class with the main function in the same package, run it, and the class is ready to run.
For the second case, the reader can first confirm that you write Java syntax has no problem, the program does not appear red wavy line does not mean that there is no problem.
If you have no problem with grammar, select the file you want to execute, right-click, select Run, and click Execute Run as application.
About Eclipse appears the selection cannot be launched,and there is no recent launches