如何在Eclipse中处理引用的项目 [英] How to work with referenced projects in eclipse

查看:94
本文介绍了如何在Eclipse中处理引用的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,也许每个人都知道该怎么做,但是我从来没有尝试过,因为我从不需要它,您如何在Eclipse中处理多个引用的项目?我有几个Struts 1 Web应用程序,它们必须使用另一个struts 1库项目,现在我正在使用url请求在它们之间进行通信,这确实很烦人(至少我是如何实现的)。

Ok maybe everybody knows how to do this, but I've never try it beacause I've never needed it so, how do you work with multiple referenced projects in eclipse? I have a couple of Struts 1 web applications that must use another struts 1 "library" project and right now I'm doing the communication between them using url requests, wich is really annoying (at least how I have implemented it).

我希望能够直接在其他Struts应用程序中使用库项目的类。

I would like to be able to use the classes of the "library" project directly in my other struts applications.

到目前为止,我知道应该在同一个工作空间中,并且必须使用项目属性中的项目引用选项进行引用,仅此而已!我真的不知道下一步该怎么做。

So far I know there are supposed to be in the same workspace and that I must reference using the "project references" options in the project properties, but that's it! I really don't know what to do next.

谢谢!

好,做到了!现在,当我将Struts应用程序导出到WAR文件中时,Struts库应用程序会发生什么?我是否需要同时导出两个单独的WAR文件,还是仅导出主要应用程序,WAR也会同时导出库Web应用程序的文件的 all

Ok, that did it! Now when I export the struts application in a WAR file what is going to happen to the struts library application? Do I need to export both in separate WAR files or just by exporting the primary applicacion WAR will export also all the files of the library web application?

推荐答案

项目菜单->属性

转到Java构建路径。

Go to the Java Build Path.

在那里,您可以直接添加库,也可以将另一个项目添加到当前项目的构建路径中。

There, you can either add the library directly or add another project into the build path of the current project.

这篇关于如何在Eclipse中处理引用的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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