eclipse工程中.classpath檔案的含義

來源:互聯網
上載者:User

eclipse工程中.classpath檔案含義:
下面是一個.classpath檔案內容:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
        <!-- 源碼目錄 -->
        <classpathentry kind="src" path="src"/>

        <!-- 工程引用外部lib目錄(最好用相對路徑) -->        
        <classpathentry kind="lib" path="G:/java_ocr/Asprise-OCR-Java-Windows_XP_32bit-4.0/aspriseOCR.jar"/>
        <classpathentry kind="lib" path="lib/xstream-1.3.1.jar"/>
        <classpathentry kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
        <classpathentry kind="lib" path="lib/commons-logging.jar"/>
        <classpathentry kind="lib" path="lib/htmlparser.jar"/>
        <classpathentry kind="lib" path="lib/jdom.jar"/>
        <classpathentry kind="lib" path="lib/log4j-1.2.8.jar"/>
        <classpathentry kind="lib" path="lib/lucene-1104.jar"/>
        <classpathentry kind="lib" path="lib/mysql-connector-java-5.0.0-beta-bin.jar"/>
        <classpathentry kind="lib" path="lib/xml-apis.jar"/>
        <classpathentry kind="lib" path="lib/nekohtml.jar"/>
        <classpathentry kind="lib" path="lib/xalan.jar"/>
        <classpathentry kind="lib" path="lib/xercesImpl.jar"/>
        <classpathentry kind="lib" path="lib/js.jar"/>
        <classpathentry kind="lib" path="lib/cobra.jar"/>
        <classpathentry kind="lib" path="lib/jdmkrt.jar"/>
       
        <!-- JDK編譯時間容器 -->
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_06"/>
        <!-- class 目錄 -->
        <classpathentry kind="output" path="bin"/>
</classpath>

說明:
1、<classpathentry kind="src" path="src"/>
含義:本工程的源碼所在地路徑--》在當前工程路徑下的src檔案下
2、<classpathentry kind="lib" path="G:/java_ocr/Asprise-OCR-Java-Windows_XP_32bit-4.0/aspriseOCR.jar"/>
含義:本工程所要應用的外部jar包,具體路徑是G:/java_ocr/Asprise-OCR-Java-Windows_XP_32bit-4.0/aspriseOCR.jar這裡利用的是絕對路徑
注意:我們不要應用絕對路徑,這樣的話我們load工程的時候就會出現找不到jar包的現象我們要用<classpathentry kind="lib" path="lib/cobra.jar"/>
這種相對路徑的格式,都用相對路徑,那麼當我們利用eclipse從檔案load一個已經存在的工程的時候就不用在重新引入jar包了
3、<classpathentry kind="output" path="bin"/>
含義:本工程編譯後的類檔案存放到當前工程路徑下的bin目錄下

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.