Lỗi editor does not contain a main type năm 2024

I have 64-bit ubuntu where I downloaded eclipse-jee-kepler-SR1-linux-gtk-x86_64.tar.gz. Here whenever I compile and run a simple code in java like the one below:

public class Sample{ public static void main(String[] args){

   System.out.println("YOLO");
} }

I always get an error: Editor does not contain a main type. How can I resolve this error?

My project structure:

Lỗi editor does not contain a main type năm 2024

Lỗi editor does not contain a main type năm 2024
May 19, 2022 in Java by • 19,050 points • 2,289 views

No answer to this question. Be the first to respond.

Your answer

This error means that Eclipse could not detect a "main" method in any of your Java classes. Eclipse is complaining about this because if you ask it to run the project, it will not know which class to start with.