circular dependency between jars (correction)

D

DinkyToy

sorry correction:


If you have to following case:

2 soon to be compiled jars:

here.jar:
org.here.SomeInterFaceA
org.here.impl.SomeImplementationA implements org.here.SomeInterFaceA
and imports org.there.SomeInterFaceB

there.jar:
org.there.SomeInterFaceB
org.there.impl.SomeImplementationB implements
org.there.SomeInterFaceB
and imports org.there.SomeInterFaceA

Is it possible to compile this stuff, or must the interfaces go
outside the two jars?
 
J

John McGrath

Is it possible to compile this stuff, or must the interfaces go
outside the two jars?

What gets placed in a JAR file has nothing to do with compilation. You
can compile the classes together, then build the two JAR files containing
the classes (interfaces) that you want them to contain.

That said, I wonder about why you want to do this. You will not be able
to use either JAR file without the other, so why make two separate JARs?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top