You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by chihi asma <ch...@yahoo.fr> on 2009/09/18 12:07:22 UTC
Problem with JNI
Hi to all,
I want to deploy a bundle that uses native libraries. I checked that my application before to integrate on osgi worked fine, the code I used to load my library is :
private native void nativePrint() ;
System.loadLibrary("JNIDemoCdl");
and my manifest is :
Manifest-Version: 1.0
Bundle-Name: JNIDemoJava
Bundle-Version: 1.0.0
Bundle-ManifestVersion: 2
Bundle-NativeCode: libJNIDemoCdl.so; processor = i386 ; osname = Linux
Bundle-SymbolicName: JNIDemoJava
Bundle-Activator: jnidemojava.Activator
Bundle-Category: example
Import-Package: org.osgi.framework
Can anyone help me with an example please?
Thanks in advance.
Asma
Re: Problem with JNI
Posted by chihi asma <ch...@yahoo.fr>.
It's working now, the problem was the location of the dynamic library.
Asma
--- En date de : Ven 18.9.09, Richard S. Hall <he...@ungoverned.org> a écrit :
De: Richard S. Hall <he...@ungoverned.org>
Objet: Re: Problem with JNI
À: users@felix.apache.org
Date: Vendredi 18 Septembre 2009, 13h32
Are you saying it doesn't work? It looks like it should. Try "x86"
instead of "i86"...maybe the alias isn't working.
-> richard
On 9/18/09 12:07, chihi asma wrote:
> Hi to all,
>
> I want to deploy a bundle that uses native libraries. I checked that my application before to integrate on osgi worked fine, the code I used to load my library is :
>
> private native void nativePrint() ;
> System.loadLibrary("JNIDemoCdl");
>
> and my manifest is :
>
> Manifest-Version: 1.0
> Bundle-Name: JNIDemoJava
> Bundle-Version: 1.0.0
> Bundle-ManifestVersion: 2
> Bundle-NativeCode: libJNIDemoCdl.so; processor = i386 ; osname = Linux
> Bundle-SymbolicName: JNIDemoJava
> Bundle-Activator: jnidemojava.Activator
> Bundle-Category: example
> Import-Package: org.osgi.framework
>
> Can anyone help me with an example please?
>
> Thanks in advance.
>
> Asma
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Problem with JNI
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Are you saying it doesn't work? It looks like it should. Try "x86"
instead of "i86"...maybe the alias isn't working.
-> richard
On 9/18/09 12:07, chihi asma wrote:
> Hi to all,
>
> I want to deploy a bundle that uses native libraries. I checked that my application before to integrate on osgi worked fine, the code I used to load my library is :
>
> private native void nativePrint() ;
> System.loadLibrary("JNIDemoCdl");
>
> and my manifest is :
>
> Manifest-Version: 1.0
> Bundle-Name: JNIDemoJava
> Bundle-Version: 1.0.0
> Bundle-ManifestVersion: 2
> Bundle-NativeCode: libJNIDemoCdl.so; processor = i386 ; osname = Linux
> Bundle-SymbolicName: JNIDemoJava
> Bundle-Activator: jnidemojava.Activator
> Bundle-Category: example
> Import-Package: org.osgi.framework
>
> Can anyone help me with an example please?
>
> Thanks in advance.
>
> Asma
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org