Eclipse software Java solution: editor does not contain a main type error box

The editor does not contain a main type error box
When you run the Java file is, if the following error box pops up:

Reason for error: The current source code (all packages) is not added to build path (SRC path with the file directory inside)

Solution: Right click on: SRC path -> Build Path -> Use as Source Folder

Now, the SRC path should look like this :(instead of a file directory, it looks like a Java package)

Eneditor does not contain a main type. eneditor does not contain a main type.


Reference site:
use the eclipse to run with the main function of the Java file, the editor does not contain a main type of mistakes box
http://blog.csdn.net/zt689/article/details/22161909

Read More: