I have application A and my own library B. My own library B imports other library C. In application A I use method from my own library B. This method uses classes from library C, and crashes, because in application A I can't import classes from library C. I know that I can add library C twice - to my app and to library B and then it should work, but I want use it only once. Is it possible or should I start crying ?


Summing, I think that this scheme should help to understand my question:

A (pplication) --> B (myOwnLibrary) --> C (otherlibrary)

A imports classes from B
B imports classes from C
A use method from B, which use classes from C, and crashes because in A I can't import classes from C

What should I do if I want import C only once and have my app working?


有帮助吗?

解决方案

You should include compiled classes from your "otherlibrary" in your classpath.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top