Hi,

here is the situation.
In sip-communicator there is a bundle named media service which
handles all the media stuff.
I'm trying to integrate some part of fmj project. So I have included
the needed libs
(fmj-sc.jar and lti-civil-no_s_w_t.jar) and I have included in the
bundle jar the needed civil.dll cause I'm currently testing on
windows.
Here is the manifest file I use.

Bundle-Activator: net.java.sip.communicator.impl.media.MediaActivator
Bundle-Name: Media Service Implementation
Bundle-Description: A bundle that offers Media capture and
presentation capabilities.
Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Bundle-NativeCode: /civil.dll; osname=WindowsXP; processor=x86;
Import-Package: org.osgi.framework,
 net.java.sip.communicator.service.configuration,
 net.java.sip.communicator.service.configuration.event,
 net.java.sip.communicator.service.protocol,
 net.java.sip.communicator.service.protocol.event,
 net.java.sip.communicator.util,
 net.java.sip.communicator.service.netaddr,
 javax.swing,
 javax.swing.event,
 net.java.sip.communicator.service.fileaccess,
 javax.sound,
 javax.sound.sampled
Export-Package: net.java.sip.communicator.service.media,
 net.java.sip.communicator.service.media.event,
 net.java.sip.communicator.impl.media,
 net.java.sip.communicator.impl.media.configuration

Is it a problem if the required dll is also in the path of the running
application.

Thanks,
damencho

On 11/9/07, Karl Pauls <[EMAIL PROTECTED]> wrote:
> On 11/9/07, Damian Minkov <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I've done this but the problem stays.
> > The results are the same no matter whether I remove the libs from
> > global classpath or not.
>
> But did you add a Bundle-NativeCode header to your manifest? Could you
> maybe share the manifest with us (and or some more information)?
>
> > should I remove the System.loadLibrary from the lib loading the native code 
> > ?
>
> no, you still need to do that.
>
> regards,
>
> Karl
>
> > damencho
> >
> > On 11/9/07, Karl Pauls <[EMAIL PROTECTED]> wrote:
> > > Hi Damian,
> > >
> > > I think your last suggestion is the solution. Try to add a
> > > Bundle-NativeCode header to your bundles manifest then the native lib
> > > should be loaded by your bundles classloader.
> > >
> > > Let us know whether that fixes your problem.
> > >
> > > regards,
> > >
> > > Karl
> > >
> > > On 11/9/07, Damian Minkov <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > I'm working on moving sip-communicator to FMJ. The FMJ lib uses native
> > > > code for working with media devices.
> > > > The lib loads itself the native libs. But here is the problem. There is
> > > > an object (VideoFormat) which is instantiated
> > > > in the native code and if I compare it ( instanceof ) in the java code
> > > > with the class VideoFormat the result is FALSE.
> > > > Then I printed both classloaders :
> > > >  - for the class loaded from java code result is -
> > > > org.apache.felix.framework.searchpolicy.ContentClassLoader
> > > >  - and for the one that comes from native code it is -
> > > > sun.misc.Launcher$AppClassLoader
> > > >
> > > > Then I noticed that the lib containing the VideoFormat class is not only
> > > > in the bundle but and in the global classpath of the
> > > > running application. So I remove it from there and the native code began
> > > > to fail as it cannot find the needed class.
> > > >
> > > > Any ideas ? I have no special native code declarations in the manifest
> > > > file of the bundle. If I have does Bundle-NativeCode declaration
> > > > will it change the classloader with the felix one for loading classes
> > > > from native code ?
> > > >
> > > > Thanks,
> > > > damencho
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > Karl Pauls
> > > [EMAIL PROTECTED]
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Karl Pauls
> [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to