将war文件导入eclipse并构建路径问题

发布于 2024-08-18 15:41:41 字数 583 浏览 2 评论 0原文

将 .war 文件导入 eclipse 时,我遇到一些奇怪的问题。

替代文本

问题是,构建文件夹不包含任何必要的类文件夹。因此,当我尝试设置构建路径时,Eclipse 报告“添加到构建路径时出错。原因:无法将输出文件夹 'projectName/build/class' 嵌套在 'projectName/build' 内。据我了解,'build' 文件夹是收集了哪些类(作为构建版本)?

我尝试忽略构建路径并将 .war 文件导出到 tomcat 服务器,但不知何故 servlet 文件不断显示我在 eclipse 中更改的旧代码所以,我想没有正确的构建。文件夹中,导出的 .war 将不包含修改后的 servlect 代码。(如果这听起来不清楚,我很抱歉)

我可以做什么来解决这个问题我已经尝试创建一个全新的工作区并重新启动了 eclipse 几次,但没有成功?解决不了问题。

I am facing some weird problem when importing .war file into eclipse.

alt text

The problem is, the build folder does not contain any necessary class folder. So when I try to set the build path, eclipse reports "Error while adding to build path. Reason: cannot nest output folder 'projectName/build/class' inside 'projectName/build'. From what I understand, 'build' folder is what classes get collected(as build version) right?

I tried to ignore build path and just export .war file into tomcat server, but somehow servlet file keeps showing old code, which I changed in eclipse. So, I am thinking without proper build folder, exported .war will not contain modified servlect code.( I am sorry if this doesn't sound clear)

What can I do to fix this problem? I already tried to create a whole new workspace and restarted eclipse several times and it didn't solve the problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南笙 2024-08-25 15:41:41

我想通了。将构建文件夹解释为我在问题中描述的内容是错误的。构建文件夹不能嵌套。

I figured it out. It was mistake to interpret build folder as what I described in the question. Build folder cannot be nested.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文