aspose file tools*
The moose likes Other Application Frameworks and the fly likes OSGi: How to add a 3rd party jar as a bundle? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "OSGi: How to add a 3rd party jar as a bundle?" Watch "OSGi: How to add a 3rd party jar as a bundle?" New topic
Author

OSGi: How to add a 3rd party jar as a bundle?

Romit Bose
Ranch Hand

Joined: Oct 03, 2007
Posts: 50
Hi,
I am very new to OSGi. Actually I just bumped into Apache Felix by chance... I have started working on DAY CQ, which is built on JCR (JSR170) and uses Apache Felix to expose the services from all the vendor APIs and some of the 3rd party APIs. Now, being a total novice to this technology, I could not find a way to create a new OSGi bundle which will house a 3rd party API, (in my case, JDOM jar), and can be exposed so that I can use JDOM in my code.
It would be really helpful if someone could help me out with a way to do this.
The Web framework being used in this DAY framework is Apache Sling.

Thanks in Advance!
Franz van Betteraey
Greenhorn

Joined: Jun 20, 2007
Posts: 18
Hi,

you can first try to find a OSGi enabled version of the library. There are some repositories for that, e.g.

(1) http://www.springsource.com/repository
(2) http://repo.fusesource.com/

I found JDOM in (1).

If no OSGi enabed version exists, you have to "wrap" or "embed" the 3rd party jar.
You will find useful tools for that here:
http://wiki.ops4j.org/display/ops4j/Pax

especially:
http://www.ops4j.org/projects/pax/construct/
will be your friend.

Regards
Klaus
Romit Bose
Ranch Hand

Joined: Oct 03, 2007
Posts: 50
Thanks Klaus!
I'll definitely try these links ASAP and get back with any more queries!
Thanks again!
Romit Bose
Ranch Hand

Joined: Oct 03, 2007
Posts: 50
It Works!!
Thanks a lot Klaus!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OSGi: How to add a 3rd party jar as a bundle?