If you get an error "editor doesn't contain a main type" in eclipse,
solution is :
1) Make sure eclipse created the project as Java project.
2) Just create a new Java project and copy your class into the src folder by import the eventual dependencies and adding all the jar files to it.
This should fix the problem.
solution is :
1) Make sure eclipse created the project as Java project.
2) Just create a new Java project and copy your class into the src folder by import the eventual dependencies and adding all the jar files to it.
This should fix the problem.
i created a folder in a project and tried to test method overloading with methods kept in test2 class and main in test1 class and created test2 object in test 1 class it was saying
ReplyDeleteeditor doesn't contain a main type
but if i paste in the SRC its working why what was the prob
It works fine with SRC because all the java files are placed in it, means all the source files are contained in it and as you know "main" is entry point for every program. So, it looks for main at first glance. "SRC" is the by default directory of the project folder to store all the raw files.
ReplyDelete