Celeb Glow
general | April 01, 2026

Eclipse throwing 'Editor does not contain a main type' error when running Java program

So I am trying to learn Java, but for some reason when ever I try to run my program in Eclipse I get this:

Eclipse Error Window

As you can see, the program is very simple (the first program I am supposed to write), so I don't know what's going on!

I haven't been able to find the log in the workspace/.metadata/.log folder as specified on the eclipse wiki and nothing appears when I launch eclipse from the terminal.

If it matters at all I installed eclipse from the archive downloaded from because I was originally going for learning how to make Android apps (then I figured I ought to learn Java first. :D)

Anyways, does anyone know what is causing this error and how to fix it?

Thanks!

1 Answer

Well, I just realized after much deliberation and reading that facepalm I had forgot the public static void main() { }!

Wow. Anyways, it's now working and I am marking this as answered.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy