- Right click on your Project in the project explorer
- Click on properties
- Click on Run
- Make sure your Main Class is the one you want to be the entry point. (Make sure to use the fully qualified name i.e. mypackage.MyClass)
- Click OK.
- Clean an build your project
- Run Project 🙂
If you just want to run the file, right click on the class from the package explorer, and click Run File, or (Alt + R, F), or (Shift + F6)