.project file and .classpath file in Eclipse

Eclipse is a runtime environment for plugins. Virtually everything you see in Eclipse is the result of plugins installed on Eclipse, rather than Eclipse itself.


Thefile is maintained by the core Eclipse platform, and its goal is to describe the project from a generic, plugin-independent Eclipse view. What's the project's name? what other projects in the workspace does it refer to? What are the builders that are used in order to build the project? (remember, the concept of "build" doesn't pertain specifically to Java projects, but also to other types of projects) .project 

Thefile is maintained by Eclipse's JDT feature (feature= set of plugins). JDT holds multiple such "meta" files in the project (see thedirectory inside the project); thefile is just one of them. Specifically, thefile contains information that the JDT feature needs in order to properly compile the project: the project's source folders (that is,whatto compile); the output folders (where to compileto); and classpath entries (such as other projects in the workspace, arbitrary JAR files on the file system, and so forth). .classpath   .settings  .classpath  .classpath   

Blindly copying such files from one machine to another may be risky. For example, if arbitrary JAR files are placed on the classpath (that is, JAR files that are located outside the workspace and are referred-to by absolute path naming), thefile is rendered non-portable and must be modified in order to be portable. There are certain best practices that can be followed to guaranteefile portability. .classpath  .classpath 

From: https://stackoverflow.com/questions/7186676/whats-in-an-eclipse-classpath-project-file#



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324946547&siteId=291194637