草庐IT

java - eclipse helios : tomcat project - jar will not be exported or published. runtime ClassNotFoundExceptions 可能会导致

coder 2024-03-26 原文

我正在使用 Eclipse Helios,我想知道如何将库项目添加到我的文件夹,该文件夹将被复制到我编译的项目所在的构建目录。

目前我做了以下事情:

  1. 在我的项目的根目录下创建了一个 lib 目录
  2. 将相关的 jar 复制到该目录
  3. 我的项目 -> 属性 -> Java 构建路径 -> 添加 jar,我添加了该目录中的所有 jar。

添加所有 jar 后,我收到有关每个 jar 文件的以下警告:

jar will not be exported or published. runtime ClassNotFoundExceptions may result

首先,我如何添加 jar 目录而不是单个 jar ? 第二个问题是如何在编译我的应用程序时正确部署这些库?!

最佳答案

在 eclipse Junu 中:

在一个web项目中,添加jar到构建路径后, 必须将它添加到

Deployment Assembly

(在项目属性中)

将该 jar 添加到“部署程序集”时,按添加按钮并选择

Java Build Path Entry

(而不是其他工作区或文件系统选项)

关于java - eclipse helios : tomcat project - jar will not be exported or published. runtime ClassNotFoundExceptions 可能会导致,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4255826/

有关java - eclipse helios : tomcat project - jar will not be exported or published. runtime ClassNotFoundExceptions 可能会导致的更多相关文章

随机推荐