I downloaded eclipse-jee-kepler-SR1-linux-gtk-x86_64.tar.gz. This eclipse is built-in with java and my Lubuntu is 64-bit. Whenever I compile and run a simple code in java like this one below:
public class Sample{
public static void main(String[] args){
System.out.println("YOLO");
}
}
I always get an Editor does not contain a main type.
I put the file in a project folder called Sample. This eclipse should compile java code because its an IDE distribution specialized for java.
How can i resolve this error?
Any help would be much appreciated.
Here's my project structure:
解决方案
I suspect the problem is that Sample.java should be in a package inside the src folder.
I guess that eclipse will not automatically look outside of there.