I\'ve forked a Github project, used Eclipse to clone it locally, and imported that as a general project into Eclipse. The accompanying .project file is an Eclipse .project
Right click at root of project select properties, in the sources tab add the folder "src/main/java" as source folder
Other way is to configure facet as java