.project and .classpath are missing in eclipse

I have a project in which there are no applications created as separate Java projects.
They were sent by someone, and somehow the files .projectand .classpathhave not been copied.

Therefore, when I try to import it into eclipse, it gives me an error: " No project found".
Is there a way to generate missing files?

+6
source share
6 answers

You cannot import them as a project if .project and .classpath are missing. You can create a new Java project and copy the source files into it.

+6
source

. Eclipse!

, , ​​Eclipse, , .project .classpath.

, , , , .project .classpath . :

.classpath:

  • txt .classpath
  • :

    <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> </classpath>

.project:

  • txt .project
  • :

    <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>HereIsTheProjectName</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>

  • . 3, HereIsTheProjectName . .

, !!

+6

, MAVEN. , .

  1. GO D:\workspace\project\. 2. : mvn eclipse: eclipse

, .

+1

. Java:

,

.

0

. , .

0

- Eclipse

Eclipse , .

  1. Eclipse , Project Explorer Package Explorer. , " " - , " " , "" !!!

  2. // Java

  3. " ", "" , .

  4. "", , "".

Eclipse project import and automatically creates the files for you .project, and .classpathby default. In one case that I tried, with the source code in the default src / main / java folder, I was able to build and run at this point.

0
source

All Articles