You have a Eclipse project, which contains Java code – but you didn’t set it up as a Java project when you created or checked out this project. So since Eclipse doesn’t allow you to change the project type inside the Gui, you are stucked.
Solution: add the java nature- Close your project.
- Open your project file (which is located in your root directory of the appropriate project) called .project with your default editor. Search for
and change it toorg.eclipse.jdt.core.javanature
Save the changed file. - Open the project again – now it’s a java project.