I am a total newbie in Java and Eclipse. I googled for lots of help but still confused. From Eclipse I click run then choose Java application and I get this error immediatel
Create a new project and make the build path to point to the existing source folders. This will resolve the "Selection does not contain a main type" error.
You cannot define the main method as you do in C++.
For the Java interpreter, the main method must always be public and static. So you need to change your main method signature to
public static void main(String args[])
Try this, and feel free to ask further. :-)
I also experienced this problem and could solve it. The solution was not mentioned yet.
In my case I'm working in Eclipse with Xtend and I converted the project to maven. After that there was a source-exclusion entry in your classpath file:
<classpathentry excluding="**" kind="src" output="target/classes" path="xtend-gen">
Then you just need to delete this line and do a clean build.