My project has two bundles, lets say Bundle A and Bundle B.
Now Bundle A needs to access a class from Bundle B.
How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two ways:
Require-Bundle: bundle-id-of-bundle-AImport-Package: package.of.your.classIn both situations, you need to export the package that contains your class in bundle B:
Export-Package: package.of.your.classAlso, here’s a good intro:
http://ctpjava.blogspot.com/2010/09/introduction-to-osgi.html