简体   繁体   English

如何在Eclipse中的构建路径中添加项目

[英]How to add a project in the build path in Eclipse

I have two project in Eclipse Indigo and I d like to add the first in the second one. 我在Eclipse Indigo中有两个项目,我想在第二个项目中添加第一个项目。

So what I do is right click on the second project: Build Path -> Configure Build Path -> Projects -> Add , and I select the first project. 因此,我要做的是右键单击第二个项目: Build Path -> Configure Build Path -> Projects -> Add ,然后选择第一个项目。

When I run my application I get a ClassNotFoundException when it tries to access a class from the first project. 当我运行我的应用程序时,当它尝试从第一个项目访问一个类时,我得到一个ClassNotFoundException

Why do I get this exception? 为什么会出现此异常? Is there anything else I need to I do other than just adding the project in the build path? 除了在构建路径中添加项目外,我还有什么需要做的吗?

右键单击项目->构建路径->配置构建路径-> 订购并导出

转到构建路径->配置构建路径->订单和导出,然后选择引用的项目。

您必须在项目构建路径属性的“订单和导出”选项卡中检查项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM