Editor does not contain a main type in Eclipse

0 votes

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:

enter image description here

May 19, 2022 in Java by Kichu
• 19,050 points
2,259 views

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

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Java

0 votes
2 answers

How can I get the filenames of all files in a folder which may or may not contain duplicates

List<String> results = new ArrayList<String>(); File[] files = ...READ MORE

answered Sep 12, 2018 in Java by Sushmita
• 6,910 points
1,623 views
0 votes
3 answers

How to check whether a file exists or not in Java?

Using nio we can check whether file ...READ MORE

answered Aug 14, 2018 in Java by Sushmita
• 6,910 points
3,515 views
0 votes
2 answers

How to find out a single character appears in String or not in Java?

You can use string.indexOf('s'). If the 's' is present in string, ...READ MORE

answered Aug 7, 2018 in Java by Sushmita
• 6,910 points
5,083 views
0 votes
1 answer

Does a 32-bit byte code work in 64-bit JVM?

Yes, Java bytecode (and source code) is ...READ MORE

answered Jun 5, 2018 in Java by sophia
• 1,400 points
772 views
0 votes
1 answer

What is the array initialization syntax when not in a declaration?

Probably you'd have to ask the Java ...READ MORE

answered Jul 13, 2018 in Java by Akrati
• 3,190 points
375 views
+4 votes
11 answers

How to import a jar file in Eclipse?

Click on File > Import. The Import ...READ MORE

answered Aug 23, 2018 in Java by Daisy
• 8,120 points
350,980 views
0 votes
1 answer

Which is the best GUI designer for Eclipse?

Windows Builder Pro is the best GUI ...READ MORE

answered May 21, 2018 in Java by Akrati
• 3,190 points
1,583 views
0 votes
2 answers

When I am running eclispe on my computer it is throwing error. How to resolve it?

If you have downloaded the 64 bit ...READ MORE

answered Dec 10, 2018 in Java by Sushmita
• 6,910 points
764 views
0 votes
1 answer

Eclipse Oxygen fails to start

I think you need to make some ...READ MORE

answered Jun 7, 2018 in Java by code.reaper12
• 3,500 points
951 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP