Observe the. Project and. classpath files in the Eclipse project.

Source: Internet
Author: User

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.

 

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.