The role of the. classpath,.settings,.project,mymetadata file in a Java project

Source: Internet
Author: User

Today made a mistake, mistakenly modified the local. classpath file, causing a lot of errors in the project, and did not carefully study the role of some of the generated files in the project.

I hereby record today.

No matter whether we create a new Java project or a Web project in Eclipse. Will generate the. seetings. Classpath. Project three files at the same time for that purpose.

the. settings file contains a variety of plug-in configuration files. This file is used by Eclipse to view the JS file, and it records what encoding to view. Unrelated to publishing: The Settings\ folder will not be hit in the. War package.
. Project is the project file, the project build configuration file , where the structure of the project is defined, such as the location of the LIB, the location of the SRC, the location of the classes
The location of the. CLASSPATH defines the $classpath that you use for this project at compile time, which is the path to the external reference package used by the project. The environment variables of the system, the VM load class to follow this path down to find,

. MyMetadata Save the project properties file

1..classpath files can be copied directly from a project of the same type,

2. When the project is contracted, you will not see the. classpath,.settings,. project files, etc., because in the course of the project contract, it has been compiled and loaded into servicecontants.

The purpose of the midpoint refresh in a project is to update the list of files in the. project file so that you display the files that are not submitted to the project through eclipse

. classpath file

<?xml version= "1.0" encoding= "UTF-8"?>

<classpath>

<classpathentry kind= "src" path= "Src/java"/>

<classpathentry kind= "src" output= "target/test-classes" path= "Src/test"/>

<classpathentry kind= "Con" path= "Org.eclipse.jdt.launching.JRE_CONTAINER"/>

<classpathentry kind= "var" path= "Maven_repo/activation/jars/activation-1.0.jar"/>

<classpathentry kind= "var" path= "Maven_repo/mvc/jars/mvc-1.0.jar"/>

<classpathentry kind= "var" path= "Maven_repo/ehcache/jars/ehcache-1.0.jar"/>

<classpathentry kind= "var" path= "Maven_repo/codemanager/jars/codemanager-1.0.jar"/>

<classpathentry kind= "var" path= "Maven_repo/jetspeed/jars/jetspeed-1.4.jar"/>

<classpathentry kind= "var" path= "Maven_repo/dwr/jars/dwr-1.1.1.jar"/>

<classpathentry kind= "var" path= "Maven_repo/servletapi/jars/servletapi-2.4.jar"/>

<classpathentry kind= "var" path= "Maven_repo/jspapi/jars/jsp-api-2.0.jar"/>

<classpathentry kind= "Lib" path= "D:/workspace/repository/junit/jars/junit-3.8.1.jar"/>

<classpathentry kind= "Output" path= "Target/classes"/>

</classpath>

1, SRC is the source document specific destination;
2, output is the purpose of class file export;
3, con is the core package required by Eclipse runtime;
4. Var is a number of jar packages that are added in the form of environment variables;
5, Lib is directly added to the jar package;
So when you need to add some third-party jar files, edit this file directly, Eclipse does not need to restart, the project will take effect, because this file is essentially the configuration of the entire project environment.

. project file
 <?xml version= "1.0" encoding= "UTF-8"?>< projectdescription> <name>createinterpret</name&    Gt <COMMENT>JAVACC [email protected] 32303037303632392d3130303020437265617465496e746572707265742f777063 </comment> <projects> </projects> <buildSpec> <buildCommand> < name>sf.eclipse.javacc.javaccbuilder</name> <arguments> </arguments> <            ;/buildcommand> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name>         <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> <NATURE>SF.ECLIPSE.JAVACC.JAVACCNATURE&L T;/nature> </natures></projectdescription> 

1, project name <name></name>
2. Project Comment Description <comment></comment>
3, the additional Eclipse plug-in required by the runtime <natures></natures>, and its specific loading mode information <buildSpec></buildSpec>
4, link the project external resources <linkedresources></linkedresources>, links can be considered as resources in the project to use, but do not create the appropriate resources locally.
<name>JavaSrc</name> the name of the resource displayed for this project;
<type>2</type> resource type (A. Seemingly except 1 for the file, the x.x form of the decimal point is the file, regardless of the decimal point after a few and the number of the decimal point is how much;
<location>D:/workspace/study/petstore/src</location> resources that are linked externally to the project.

Refer to: https://yq.aliyun.com/articles/2597

Http://183.207.103.93/IMP/resManage/playerRecord

The role of the. classpath,.settings,.project,mymetadata file in a Java project

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.