Calling third party jar method from OSGi Bundle [message #93061] |
Thu, 26 July 2007 07:40  |
Eclipse User |
|
|
|
Originally posted by: michael2de.yahoo.com
Hi All
From my bundle installed in equinox, I want to call a method of third party jar (asm.jar). One way of doing this is to include this jar in the bundle but there is a restriction that we cannot include this jar in the bundle.
Is there a way to call this jar present outside on file system from inside the container.
Thanks,
MJ
|
|
|
Re: Calling third party jar method from OSGi Bundle [message #93076 is a reply to message #93061] |
Thu, 26 July 2007 09:28   |
Eclipse User |
|
|
|
Hi Michael,
I can think of three methods to do this:
1) create a new url classloader, pass the filesystem url and call the
jar entry point via reflection. Ugly:)
2) deploy the jar in the system classpath and export its packages via
framework extension. Then, you import them in your bundle and everything
is OK.
3) bundle-ize the third party library. I don't know what are the
restriction of the license of the library, so you need to figure out
whether this makes any sense. Perhaps, not:)
So, the best option you have is 2). How to do it:
http://dev.eclipse.org/mhonarc/lists/equinox-dev/msg02229.ht ml
However, this message is quite scarce, so if you need additional
assistance, drop a message.
Michael wrote:
> Hi All
>
> From my bundle installed in equinox, I want to call a method of third party jar (asm.jar). One way of doing this is to include this jar in the bundle but there is a restriction that we cannot include this jar in the bundle.
>
> Is there a way to call this jar present outside on file system from inside the container.
>
> Thanks,
> MJ
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05562 seconds