Eclipse 工程目錄下的.classpath、.project文件和.settings文件作用


1、.classpath 定義了你這個項目在編譯時所使用的$CLASSPATH (注: 每次在更新jar的版本或者增加jar之后,請在SVN提交.classpath文件,否則工程的build path的jar中顯示的一個已經不存在的jar)

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="src" path="resource"/>
	<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
	<classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/xmlbeans-2.6.0.jar"/>
	<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/XmlSchema-1.4.7.jar"/>
	<classpathentry kind="output" path="build/classes"/>
</classpath>

 eclipse中的配置決定.classpath文件內容

 

2、.project文件記錄工程信息

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>bonc_ioc_omp</name>   <!-- 工程名稱 -->
    <comment></comment>   <!-- 工程描述 -->
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>   <!-- build項目時校驗選項 -->
            <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.common.project.facet.core.builder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.wst.validation.validationbuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>  <!-- 加載eclipse自帶插件  -->
        <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
        <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
        <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
        <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    </natures>
</projectDescription>
buildCommand選項的設置由下圖的設置處決定

 

3、settings文件夾記錄工程的基本設置,如編碼、使用的jdk版本、文件編譯的jdk版本等信息

 
        

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM