Eclipse projects – The nature of things

Did you ever wounder what defines if a project is “pure” Java project or a Plugin project?

Have a look at the “.project” file. This file contains the description of your project. It contains a XML tag “natures” where the nature of the project is described. A plugin project has the nature “org.eclipse.pde.PluginNature” and a java project has the nature “org.eclipse.jdt.core.javanature”.

These tags will also steer some behavior of the development environment, e.g. a project with PluginNature will update the java class path if you change the dependency information in a plugin project. For example if you add the “org.eclipse.pde.PluginNature” to an existing Java project you get the PDE menu for your project.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, He is the primary author of With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.
This entry was posted in Eclipse and tagged . Bookmark the permalink.

2 Responses to Eclipse projects – The nature of things

  1. I struggled a few times with this already đŸ˜‰
    There are a few gotchas when modifiying the .project file while the project’s already present & active in the workspace. I usually tried this when importing maven projects I checked out in a first step (checkout maven project with m2eclipse has a bug, the wizard is not usable). The import stalled several times or even failed, leaving incomplete project that do not have the java nature. I then tried to add the java nature by hand. Unfortunately eclipse couldn’t manage this change. Even closing and reopen the project does not help. I had to delete an reimport.

  2. Lars Vogel says:

    @AndrĂ© Seems like Maven introduces sometimes also problems. đŸ˜‰

Comments are closed.