一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

Eclipse错误:Problems opening an editor Reason: [Project Name] does not exist解决办法

时间:2015-06-27 编辑:简简单单 来源:一聚教程网


问题简单描述:在eclipse里用F3想进入某个类的某方法时,提示以下错误:

Problems opening an editor Reason: [项目名] does not exist


经过百度上谷歌一番,看到stackoverflow上的相同的一个问题 的解决方法如下:


 
本人英语不是太好,不做完整的字句翻译(后面有英文),只能简单用中文说一下问题的原因:我的项目是从github clone下来的,可能是在导入eclipse时,项目还不是“通常”的eclipse项目,所以有些功能还不能使用,比如[我想看引用到的类或方法]这个功能就还不能用,解决的办法就是先转一下项目。而我clone的源码里面有pom.xml,就是可以使用maven构建项目啦,所以我就转成maven项目。

转换的第一种方式:

项目右键-->configure-->convert to maven project   #这个方法没能解决我的问题,且编译错误
转换的第二种方式:

cd到项目根目录-->mvn eclipse:eclipse   #这个解决了我的问题
 

解决问题总结:

直接使用maven的命令转到eclipse项目即可。
 

下面的内容虽然没有能直接解决问题,至少给了解决问题的方向,引用部分内容:

 If you have checked out project from svn, project checked out is not generally a eclipse project thats why general functionality of eclipse does not work for the same.

To achieve the same functionality of eclipse like eclipse reader and all other shortcuts,we have to convert the checked out project to eclipse project.

Steps to Convert checked out project to eclipse project:

    Right Click on Checked-out Project.
    Point to Configure.
    Click on Convert to Maven Project.(if checked out project is maven project)

These steps will convert the project to Maven project.

All the eclipse functionality will work for the same.
So I have resolved the issue by checking out the project via "New Project Wizard". Embarrassed
It wasn't an Eclipse project in SVN, so when checked out via "Existing Project", none of the project functionality could work.

热门栏目