用于eclipse项目的JAR文件夹 [英] JAR file folder for eclipse projects

查看:160
本文介绍了用于eclipse项目的JAR文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为此工作空间中的引用项目创建一个集中文件夹(在我的eclipse工作区中的某种元项目中),用于常用的JAR文件。它应该类似于Web项目的WEB-INF / lib文件夹,但也适用于非Web项目,并自动扫描并添加此文件夹中的所有jar文件。

I'm trying to create a centralized folder (in some kind of a "meta project" in my eclipse workspace) for commonly used JAR files for referenced projects in this workspace. It should work similar to the WEB-INF/lib folder for web projects but also apply to non web projects, and automatically scan and add all jar files in this folder.

我尝试使用这些jar文件创建一个用户库并在项目中引用它们,但我仍然需要手动将每个新jar添加到用户库(并且不知道它是否相对于absoulute引用)和Tomcat(WTP)似乎没有把这些文件(运行方式 - >运行在服务器上)放入其类路径(我不想复制jar并将它们放入WEB-INF / lib)。任何想法?

I tried to create a user library with these jar files and reference them in the project but I still have to add every new jar manually to the user library (and don't know if it is referenced relative of absoulute) and Tomcat (WTP) doesn't seem to take these files (Run As -> Run on Server) into its classpath (and I don't want to duplicate the jars and put them into WEB-INF/lib). Any ideas?

推荐答案

为常春藤+1。

如果你而不是在Eclipse中的一个独立项目中执行它:

If you'd rather do it in a separated project in Eclipse:

您为其他项目添加了公共项目(Java Build Path-> Projects,然后添加) )。但是,你有出口'共同项目'的罐子吗? (在常见项目中:Java Build Path-> Order and Export,然后检查所有jar)。

You added the 'common project' as on dependency for other projects (Java Build Path->Projects, then Add). But, have you exported the jars of the 'common project'? (In the common project: Java Build Path->Order and Export, then check all jars).

这篇关于用于eclipse项目的JAR文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆