Why “no projects found to import”?

后端 未结 11 1782
臣服心动
臣服心动 2020-12-02 04:39

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

11条回答
  •  旧巷少年郎
    2020-12-02 05:27

    I have a perfect solution for this problem. After doing following simple steps you will be able to Import your source codes in Eclipse!


    First of all, the reason why you can not Import your project into Eclipse workstation is that you do not have .project and .classpath file.

    Now we know why this happens, so all we need to do is to create .project and .classpath file inside the project file. Here is how you do it:


    First create .classpath file:

    1. create a new txt file and name it as .classpath
    2. copy paste following codes and save it:



    Then create .project file:

    1. create a new txt file and name it as .project
    2. copy paste following codes:

      HereIsTheProjectName org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature

    3. you have to change the name field to your project name. you can do this in line 3 by changing HereIsTheProjectName to your own project name. then save it.


    That is all, Enjoy!!

提交回复
热议问题