将Jar文件添加到WEB-INF/lib [英] Adding Jar File to WEB-INF/lib
问题描述
我是Eclipse,Java和Linux的新手.我搜索了此问题,但没有得到答复.我想编写一个处理HBase表的程序.因此,我有一些与HBase相关的Jar文件.在普通的Java应用程序中,我按照以下说明添加Jar文件
I new in Eclipse,Java and Linux. I search about this issue but I don't reach to answer. I want to write a program that manipulate HBase Tables. So I have some Jar files that they related to the HBase. In ordinary Java application I add Jar files through following instruction
构建路径->配置构建路径->添加外部Jars
Build Path -> Configuration Build Path -> Add External Jars
因此在Dynamic Web Project中声音听起来有所不同.经过一些搜索后,我了解到Jar文件必须添加到WEB-INF/lib或%TOMCAT_HOME%/lib中.所以我从%TOMCAT_HOME%/lib得到了答案,但确实对如何在WEB-INF/lib中添加jar文件一无所知.我复制了文件夹中的所有jar文件,但无法正常工作.
So in Dynamic Web Project sound like different. after some search I understand the Jar files must be added in WEB-INF/lib or in %TOMCAT_HOME%/lib. so I get answer from %TOMCAT_HOME%/lib but really stuck about how to add jar files in WEB-INF/lib. I copy all jar files in the folders but it doesn't work.
请详细帮助我.
推荐答案
您做对了....
Build Path -> Configuration Build Path -> Add External Jars
在订购和出口"标签中,单击全选...
In "Order and Export" tab click on select all...
or coping file into WEB-INF/lib
然后只需刷新您的项目并重新启动服务器,然后部署该项目即可正常运行...
Then just refresh your project and restart the server then deploy the project it will work fine...
这篇关于将Jar文件添加到WEB-INF/lib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!