简体   繁体   中英

In Eclipse, how to add a folder of jars under WEB-INF/lib folder?

I am currently getting an error of

.jar will not be explored or published. Runtime ClassNotFoundExceptions may result. 

The reason for that is I did not put my libraries under WEB-INF/lib folder directly. I put them in folders. Is there a way to store them rather in folders?

Structure:

WEB-INF
---lib
------folder1
---------<jars>
------folder2
---------<jars>

Those jars are not added to the classpath, even though I select them through Build Path -> Configure Build Path -> Libraries -> Add JARs...

First You can create a User Library Go to Window => Preferences=> Java => Build Path => User Libraries. => Then choose New, and give your library a name => Then add the JARs you want.

Once the Librray is created at them in class path of your project.To add right-clicking on the project => Propertries=>Library Tab=>Add Libraries => User Libraries, and selecting your library name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM