简体   繁体   中英

Import libraries imported by library?

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 AI 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?


您应该在类路径中包含“otherlibrary”中的已编译类。

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