I have looked everywhere on the internet and tried everything the forums say to do and nothing works. This error keeps coming up. I have tried running my java project (not for a
Eclipse needs to see a main method in one of your project's source files in order to determine what kind of project it is so that it can offer the proper run options:
public static void main(String[] args)
Without that method signature (or with a malformed version of that method signature), the Run As menu item will not present any run options.
When you create a new class file, try to mark the check box near
public static void main(String[] args) {
this will help you to fix the problem.
Have you checked if:
class
file under src
folder in your JAVA project?(not file
)I am a newbie who try to run a helloworld example and just got the same error as yours, and these work for me.
click on the project that you want to run on the left side in package explorer and then click the Run button.
Make sure the "m" in main() is lowercase this would also cause java not to see your main method, I've done that several times unfortunately.
It happens when sometimes we copy or import the project from somewhere. The source folder is a big thing to concern about.
One simple technique is, create a new project, inside the source folder, create a new class and paste the content over there.
It will work...
Hope it helps.