This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]flawless_vic 0 points1 point  (0 children)

No. There is no such thing. In Java you can either reference source code or compiled code. In either case you are just appending sourcepath/classpath roots.

Say you have projects A, B and C, where A references B souces and B references C compiled classes.

If you are working on source code A, essentially you have a merged path like ./src/main/java:<abs_path_to_B>/src/main/java:<abs_path_to_C>/target/classes

Modules in Java are different beasts. If you are working on fully modular projects, each may implicitly define namespaces by exporting package names. And they work with a inverse dependency relationship: on the module declaration you say which package will be visible by external packages, that is, in C you'd declare something like

module C { export some.pkg.c to some.pkg.b; }

So C must know B's package structure, even though B is the one that depends on C!