I did not intend to open the Eclipse project today. classpath and. project File, found that the original two files are XML files, and comply with certain rules, so made some records, I believe, in the use of eclipse visualization to build the project is invalid, and so on, you can manually modify or create these two files to create an Eclipse project.
First, let's look at an example.
. Classpath File
<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <classpath> <br/> <classpathentry kind = "src" Path = "src"/> <br/> <classpathentry kind = "con" Path = "org. eclipse. jdt. launching. jre_container "/> <br/> <classpathentry combineaccessrules =" false "kind =" src "Path ="/sepsif "/> <br/> <classpathentry kind =" lib "Path = "Google/gdata-calendar-2.0.jar"/> <br/> <classpathentry kind = "lib" Path = "Google/gdata-client-1.0.jar"/> <br/> <classpathentry kind = "lib" Path = "Google/gdata-core-1.0.jar"/> <br/> <classpathentry kind = "lib" Path = "Google/google-collect-1.0-rc1.jar"/> <br/> <classpathentry kind = "lib" Path = "Google/wsdl4j-1.6.1.jar"/> <br/> <classpathentry kind = "lib" Path = "Google/JXTA. jar "/> <br/> <classpathentry kind =" lib "Path =" Google/ant. jar "/> <br/> <classpathentry kind =" output "Path =" bin "/> <br/> </classpath> <br/>
. Project File
<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <projectdescription> <br/> <Name> sepsifsample </Name> <br/> <comment> </comment> <br/> <projects> <br/> </Projects> <br/> <buildspec> <br/> <buildcommand> <br/> <Name> Org. eclipse. jdt. core. javabuilder </Name> <br/> <arguments> <br/> </buildcommand> <br/> </buildspec> <br/> <natures> <br/> <nature> Org. eclipse. jdt. core. javanature </nature> <br/> </natures> <br/> </projectdescription> <br/>
My project directory is as follows:
We found several problems. The project name is defined by the <Name> label in the. Project, rather than the file directory name;
The class path is defined by classpathentry;
The following definition defines a project as a class path:
<Classpathentry combineaccessrules = "false" kind = "src" Path = "/sepsif"/>
Specifically,/sepsif is another project in the same root directory as sepsif samples;
<Classpathentry kind = "output" Path = "bin"/> defines the directory to output the class file.
Therefore, we can imitate this file template and write it by ourselves. project and. classpath file to build an Eclipse project. This is really an indispensable skill and capability for people who like RCP development. It may come in handy at critical moments.