Reputation: 53
I have made some jars in a bundle. For example: a.jar, b.jar, a.jar has class named some.pkg.SomeClass. I writed MANIFEST.MF file like below:
Bundle-ClassPath: lib/a.jar,
lib/b.jar
Export-Package:some.pkg
I export the jar with name ab.jar,and it worked in an osgi environment.But in a non-osgi environment, when I refer this class some.pkg.SomeClass, it failed!
So how can I refer this class some.pkg.SomeClass in a same jar not only in an osgi environment but also in a non-osgi environment?
Upvotes: 0
Views: 76
Reputation: 19606
If you package jars inside the ab.jar then it is not possible to access these outside of OSGi.
An alternative is to use the maven shade plugin to extract the classes from both jars and package the classes in the ab.jar.
Upvotes: 2