为什么“没有项目被发现导入”? [英] Why "no projects found to import"?

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

问题描述

我正在尝试将现有项目导入工作空间。作为根目录,我选择所有.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特定的文件, code> .project 和 .classpath 。您给Eclipse提供了错误的目录(如果您正在导入eclipse项目),或者您实际上想从现有的源代码创建一个新项目( new - > java项目 - > 从现有的源代码创建项目

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天全站免登陆