在Eclipse中,如何在WEB-INF/lib文件夹下添加jar文件夹? [英] In Eclipse, how to add a folder of jars under WEB-INF/lib folder?
问题描述
我目前收到
.jar will not be explored or published. Runtime ClassNotFoundExceptions may result.
原因是我没有将我的库直接放在WEB-INF/lib文件夹下.我把它们放在文件夹中.有没有办法将它们存储在文件夹中?
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?
结构:
WEB-INF
---lib
------folder1
---------<jars>
------folder2
---------<jars>
即使我通过构建路径->配置构建路径->库->添加JAR ...来选择它们,这些jar也不会添加到类路径中.
Those jars are not added to the classpath, even though I select them through Build Path -> Configure Build Path -> Libraries -> Add JARs...
推荐答案
首先,您可以创建用户库转到窗口=>首选项=> Java =>构建路径=>用户库.=>然后选择新建",并给您的库起一个名字=>然后添加所需的JAR.
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.
在项目的类路径中的库中创建Librray之后.右键单击该项目=> Propertries => Library Tab => Add Libraries => User Libraries,然后选择您的库名.
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.
这篇关于在Eclipse中,如何在WEB-INF/lib文件夹下添加jar文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!