为什么“找不到要导入的项目"? [英] Why "no projects found to import"?

查看:28
本文介绍了为什么“找不到要导入的项目"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将现有项目导入工作区".作为根目录",我选择了所有 .java(和 .class)文件所在的目录.Eclipse 写信给我说找不到要导入的项目".为什么?

I am trying to "import existing project into workspace". As the "root directory" I select the directory where all my .java (and .class) files are located. Eclipse writes me that "no projects are found to import". Why?

推荐答案

Eclipse 正在寻找 Eclipse 项目,这意味着它正在根目录中搜索特定于 Eclipse 的文件,即 .project 和 <代码>.classpath.您给 Eclipse 错误的目录(如果您要导入 Eclipse 项目),或者您实际上想从现有源创建一个新项目(new->java project->从现有源创建项目).

Eclipse is looking for eclipse projects, meaning its is searching for eclipse-specific files in the root directory, namely .project and .classpath. You either gave Eclipse the wrong directory (if you are importing a eclipse project) or you actually want to create a new project from existing source(new->java project->create project from existing source).

我想你可能想要第二个,因为 Eclipse 项目通常有单独的源代码 &建立目录.如果您的源文件和 .class 文件在同一目录中,则您可能没有 Eclipse 项目.

I think you probably want the second one, because Eclipse projects usually have separate source & build directories. If your sources and .class files are in the same directory, you probably didn't have a eclipse project.

这篇关于为什么“找不到要导入的项目"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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