简体   繁体   中英

Eclipse project not added to the build path

I have Project A with a dependency on project B and project B with a dependency on project A. Project B compiles and runs and I can see in the properties of the debug that Project A is in the classpath. When I try to run Project A, I don't see Project B, or another third party external JAR library. The error I get is "java.lang.ClassNotFoundException". I have set Windows-Preferences-Building-Build Path Problems-Circular Dependencies to warnings, as recommended in another answer. This was working recently, although I had to reimport my projects for another reason and I can't get it to work now.

I tried a project the same way, didn't know about the cycle. To avoid this problem, as an alternative I created a maven project, with a parent pom, in which i declared the two seperate projects A and B as child projects. Then you can add the projects in the pom-file as dependencies. Maybe its a solution to your project, to use Maven as build tool.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM