简体   繁体   English

在Eclipse中,如何在WEB-INF / lib文件夹下添加jar文件夹?

[英]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. 原因是我没有将库直接放在WEB-INF / lib文件夹下。 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... 即使我通过构建路径->配置构建路径->库->添加JAR来选择它们,这些jar也不会添加到类路径中。

First You can create a User Library Go to Window => Preferences=> Java => Build Path => User Libraries. 首先,您可以创建一个用户库。转到窗口=>首选项=> Java =>构建路径=>用户库。 => Then choose New, and give your library a name => Then add the JARs you want. =>然后选择New,并给您的库起一个名字=>然后添加所需的JAR。

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. 一旦在项目的类路径中在他们处创建了Librray。要添加右键单击项目=> Propertries => Library Tab => Add Libraries => User Libraries,然后选择您的库名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Maven不会在WEB-INF / lib文件夹中复制spring jars - Maven does not copy spring jars in WEB-INF/lib folder 从Web-Inf / Lib文件夹中排除一些JAR - Exclude some JARs from Web-Inf/Lib Folder 如何将 JAR 文件添加到 Eclipse 中的 web-inf/lib 文件夹? - How can I add JAR files to the web-inf/lib folder in Eclipse? 如何让Eclipse自动将我放在WEB-INF / lib文件夹中的jar包含到我的项目中? - How do I make Eclipse automatically include jars I place in my WEB-INF/lib folder into my project? 如何使用Eclipse IDE在Web应用程序中的WEB-INF / lib下对库jar进行分组 - How to group library jars under WEB-INF/lib in a web application using eclipse ide 使用Ant Build脚本创建WarFile时,如何在WEB-INF / lib文件夹中包含Classpath jars - How to include Classpath jars in WEB-INF/lib Folder while creating a WarFile using Ant Build Script 如何将罐子从WEB-INF / lib复制到Maven战争中的另一个文件夹 - how to copy jars from WEB-INF/lib to another folder in war in maven 使用 Eclipse 在 JBoss 上部署时 WEB-INF/lib 文件夹消失 - WEB-INF/lib folder disappears when deploying on JBoss with Eclipse Maven2 IDEA项目,如何手动添加到web-inf/lib文件夹? - Maven2 IDEA project, how to manually add to web-inf/lib folder? 如何将 JAR 文件添加到现有的 WAR 文件 web-inf/lib 文件夹中? - How to add JAR file to an existing WAR file web-inf/lib folder?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM