Eclipse:资源不在Java项目的构建路径上 [英] Eclipse: The resource is not on the build path of a Java project
问题描述
我已经获得了一个Java项目的源文件夹( src
)。我已经创建了一个 .project
文件,将其保存在该文件夹中,并将该项目导入到Eclipse 3.6中,方法是通过将现有项目导入Workspace选项并将其添加到其中。 p>
现在的问题是,当我在项目中执行呼叫层次结构时,它会显示一个警告框说
该资源不在构建java项目的路径
有没有人可以让我知道如何解决这个问题?
请看图片
< img src =https://i.stack.imgur.com/11vvL.pngalt =在此输入图像说明>
谢谢
您可以添加 src
文件夹以构建路径: p>
- 选择Java透视图。
- 右键单击
src
文件夹。 - 选择构建路径>使用源文件夹/ li>
你完成了希望这个帮助。
编辑:请参阅 Eclipse文档
I have been given a Source Folder (src
) of a Java Project. I have created a .project
file, kept it inside that folder and imported that Project into Eclipse 3.6 through the Import Existing Projects into Workspace Option and added required jars to it.
Now the Problem is that when ever i do a Call Hierarchy on a Project , It displays a Alert box Saying "The resource is not on the build path of a java project"
Could anybody please let me know how to resolve this ?
Please see the image here
Thanks
You can add the src
folder to build path by:
- Select Java perspective.
- Right click on
src
folder. - Select Build Path > Use a source folder.
And you are done. Hope this help.
EDIT: Refer to the Eclipse documentation
这篇关于Eclipse:资源不在Java项目的构建路径上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!