Detailed description of eclipse and myeclipse project Descriptors

Source: Internet
Author: User


 

Sometimes we need to add a third-party jar package in a Java project. In this case, you should add the best relative path,
Instead of absolute path. Otherwise, your project won't run unless you get it. That is to say, you 'd better put the relevant jar in the project directory. The web project is relatively simple. The web project has a lib directory. Just copy it here. Not web engineering. Eclispe cannot import copy automatically.
This requires manual configuration. For the work description file, eclipse and myeclpse are described in XML.

Now let's take a look at the eclipse. classpath file:

<? XML version = "1.0" encoding = "UTF-8"?>
<Classpath>
<! -- Source code directory -->
<Classpathentry kind = "src" Path = "src"/>
<! -- JDK runtime container -->
<Classpathentry kind = "con" Path = "org. Eclipse. jdt. Launching. jre_container"/>
<! -- The following is the directory customized by the class library path. -->
<Classpathentry kind = "lib" Path = "lib/swing-layout-1.0.3.jar"/>
<Classpathentry kind = "lib" Path = "lib/absolutelayout. Jar"/>
<Classpathentry kind = "lib" Path = "lib/jtds-1.2.2.jar"/>
<Classpathentry kind = "lib" Path = "lib/jxl. Jar"/>
<! -- Output the class directory after compilation -->
<Classpathentry kind = "output" Path = "bin"/>
</Classpath>

I have added comments to XML. You also understand.

. Project File: <? XML version = "1.0" encoding = "UTF-8"?>
<Projectdescription>
<! -- Project name -->
<Name> execlinterface </Name>
<Comment> </comment>
<Projects> </Projects>
<! -- The compiler specifies -->
<Buildspec>
<Buildcommand>
<Name> org. Eclipse. jdt. Core. javabuilder </Name>
<Arguments> </arguments>
</Buildcommand>
</Buildspec>
<! -- Core features -->
<Natures>
<Nature> org. Eclipse. jdt. Core. javanature </nature>
</Natures>
</Projectdescription>

A. mymetadata file is added to the myeclipse project: <? XML version = "1.0" encoding = "UTF-8"?>
<! --
Type: project type
Name: Project name
ID: Unique identifier of a project in a workspace
Context-root: website root path
J2ee-spec: J2EE standard
Archive: War file after Packaging
-->

<Project-Module
Type = "Web"
Name = "Upload"
Id = "myeclipse.1152954865843"
Context-root = "/upload"
J2ee-spec = "1.4"
Archive = "Upload. War">
<Attributes>
<! -- Value: web root directory name -->
<Attribute name = "webrootdir" value = "webroot"/>
</Attributes>
</Project-module>

Related Article

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.