User Libarary imported by eclipse

Source: Internet
Author: User

When importing an external jar package using Eclipse, the add User libarary is often used in such a way that the external jar packages are not added directly to the web-inf/libs, where are these jars introduced?

Using an external jar, you can place it under Classpath, and in the current web directory you can find the. classpath file, open as follows:

<?xml version= "1.0" encoding= "UTF-8"?
<CLASSPATH>
<classpathentry kind=" src "path=" src "/>
<classpathentry kind=" con "path=" org.eclipse.jdt.launching.jre_container/ org.eclipse.jdt.internal.debug.ui.launcher.standardvmtype/javase-1.7 "/>
<classpathentry kind=" con "path=" org.eclipse.jdt.user_library/common-logging "/>
<classpathentry kind= "con" path= "org.eclipse.jdt.USER_ Library/spring "/>
<classpathentry kind=" Output "path=" Bin "/>
</CLASSPATH>

Only two libarary:spring and common-logging are introduced here. As you can see, this is just the user libarary name, where is the path that really introduces those jars?

Under {Workspace}\.metadata\.plugins\org.eclipse.core.runtime\.settings's org.eclipse.jdt.core.prefs file, you can find the following:

Org.eclipse.jdt.core.userlibrary.spring=xxx

Org.eclipse.jdt.core.userlibrary.common-logging=xxx

xxx Here is the actual address of the corresponding jar on the hard disk. Other projects under current workspace can also be referenced directly to the corresponding user libarary.

Take common-logging as an example, after removing \ t, \ r \ n and other escape characters, as follows:

<?xml version= "1.0" encoding= "UTF-8"?>
<userlibrary systemlibrary= "false" version= "2" >
<archive path= "D:/javawebapis/log/commons-logging-1.2.jar"/>
</userlibrary>

The path of the archive node is the hard disk location of the jar package, and if there are multiple jars, there will be multiple archive nodes

User Libarary imported by eclipse

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.