teczarina
teczarina

Reputation: 82

Java Classes with small letter name in Eclipse

I made one simple following class in Eclipse:

package Practice;

public class smallLetterClass {

    public static void main(String[] args){


        smallLetterClass fp=new smallLetterClass();
        fp.flip();

    }

    public void flip(){
        System.out.println("Hi");
    }

}

I got this error:

Error: Main method not found in class Practice.smallLetterClass, please define the main method as:
   public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application

Though I was able to resolve it by making Java class name starting with capital letter. Can anyone help in understanding what exactly happened here?

Upvotes: 0

Views: 555

Answers (1)

kagmole
kagmole

Reputation: 2165

Are you running it as a Java Application? If so, try cleaning the project.

Project > Clean... > OK

If it doesn't help, it means your .metadata folder is corrupted. See this post for resolution.

Upvotes: 2

Related Questions