To change a general project which may have been downloaded from repository to a Java project close the project in Eclipse. Open the .project file in a text editor. Change the <natures> </natures> to
<natures> <nature>org.eclipse.jdt.core.javanature</nature></natures> and <buildSpec> </buildSpec> to
<buildSpec><buildCommand> <name>org.eclipse.jdt.core.javabuilder</name><arguments> </arguments></buildCommand></buildSpec>.
To change to another type like a cordys project use <natures> <nature>org.eclipse.jdt.core.javanature</nature> <nature>com.cordys.coe.CEP.nCordysProjectNature</nature></natures>
Open the project again.