How to change an Eclipse default project into a Java project

Open the .project file and add java nature and builders.

<projectDescription>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
</projectDescription>

And in .classpath, reference the Java libs:

<classpath>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
</classpath>

Manually changing XML and/or settings is very dangerous in eclipse unless you know exactly what you're doing. In the other case you might end up finding your complete project is screwed. Taking a backup is very recommended!

How to do it just using Eclipse?

  1. Select project.
  2. Open the project properties through Project -> Properties.
  3. Go to "Targetted Runtimes" and add the proper runtime. Click APPLY.
  4. Go to "Project Facets" and select the JAVA facet which has appeared due to step 4. Click APPLY
  5. Set your build path.
  6. If it's a Maven project, you might want to select the project, click Maven -> Update Project configuration...

That did it for me. And Eclipse is configured correctly. Hope it'll work for you too.


In recent versions of eclipse the fix is slightly different...

  1. Right click and select Project Properties
  2. Select Project Facets
  3. If necessary, click "Convert to faceted form"
  4. Select "Java" facet
  5. Click OK

I deleted the project without removing content. I then created a new Java project from an existing resource. Pointing at my SVN checkout root folder. This worked for me. Although, Chris' way would have been much quicker. That's good to note for future. Thanks!


Using project Project facets we can configure characteristics and requirements for projects.

To find Project facets on eclipse:

  • Step 1: Right click on the project and choose properties from the menu.
  • Step 2:Select project facets option. Click on Convert to faceted form... enter image description here

  • Step 3: We can find all available facets you can select and change their settings. enter image description here