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:
- Eclipse: unable to open editor: no ID org.eclipse.jdt . ui.CompilationUnitEditor Editor descriptor for
- Access restriction in Eclipse: the type ‘xxx’ is not API solution
- Start Eclipse and pop up the “Failed to load the JNI shared library jvm.dll” dialog box
- Eclipse report error Error:opening registry key ‘Software/JavaSoft/JRE’
- Eclipse startup error: a Java runtime environment (JRE) or Java Development Kit (JDK) must be available
- Successful solution of eclipse startup error Error:Could not create the Java Virtual Machine Error:A fatal exception has occurred
- After eclipse eclipse eclipse imports the correct project, an error is reported in XML and other files
- The Java command could not find or load the main class
- Eclipse can’t open an error: Error:could not find java SE Runtime Environment/Error: could not find java.dll
- Tomcat memory overflow in Eclipse: Java. Lang. outofmemoryerror: permgen space solution:
- The solution of a Java exception has occurred. And error exception in thread when eclipse runs
- Eclipse port occupied( java.net.BindException : address already in use: bind) solution
- Java:Error:Open registry key software \ JavaSoft \ Java Runtime Environment Problems
- Error: (22,57) Java: type parameter… Mapper is not in the range of type variable M
- Invalidation of margin top property of nested box in CSS style box
- The solution to “polling news feeds” appeared in Eclipse in Java
- No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.la
- Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;
- Eclipse run main method error: a JNI error has occurred, please check your installation and try again
- Solution: Rsync error: some files could not be transferred (code 23) at main. C (702)