Building Java projects with circular imports in Eclipse

Posted by Buggieboy on Stack Overflow See other posts from Stack Overflow or by Buggieboy
Published on 2010-03-10T16:42:54Z Indexed on 2010/03/11 4:55 UTC
Read the original article Hit count: 326

Filed under:
|
|

I have a legacy Java (not my native language) app that I'm trying to build in Eclipse Galileo.

As it's not my own, I can't speak to the quality of the design, but I am coming across a number of instances where I'll have something like this:

In a project called, say, "lib_a", I'll have a file containing this:

import com.acme.lib_b.onething;

Project "lib_b" on the other hand, will contain:

import com.acme.lib_a.anotherthing;

Of course, the problem is that one project can't be built because the errors prevent me from creating a .jar file that can be added as an external archive to the other project, and vice versa.

It seems to me that this must be a fairly common occurence in building Java applications. Rewriting it from scratch is not an option here, so I'd like to know "what other folks do."

© Stack Overflow or respective owner

Related posts about eclipse

Related posts about java