Hi, BJ

Thank you for the very quick response.

On Mon, 26 Apr 2010 21:28:36 -0400
BJ Hargrave <[email protected]> wrote:

BJ> Sure. The VM will call the class loader of the class calling 
BJ> System.loadLibrary. The class loader's findLibrary method wont know of the 
BJ> library, so the VM will look in a standard place like LD_LIBRARY_PATH will 
BJ> be consulted.

I understand that bundle A without the Bundle-NativeCode can load the
native codes in the standard place.
It relieved me.

BJ> Did you try this out?

Yes and I succeeded in loading the code. 

However, from the OSGi Spec point of view, 
I cannot find whether it is proper way.
(This might be not OSGi issue but System.loadLibrary issue.)

That's why I asked.

Best regards,

=======
Ikuo YAMASAKI



BJ> -- 
BJ> 
BJ> BJ Hargrave
BJ> Senior Technical Staff Member, IBM
BJ> OSGi Fellow and CTO of the OSGi Alliance
BJ> [email protected]
BJ> 
BJ> office: +1 386 848 1781
BJ> mobile: +1 386 848 3788
BJ> 
BJ> 
BJ> 
BJ> 
BJ> From:
BJ> Ikuo Yamasaki <[email protected]>
BJ> To:
BJ> OSGi Developer Mail List <[email protected]>
BJ> Date:
BJ> 2010/04/26 21:22
BJ> Subject:
BJ> [osgi-dev] loading native code outside of the bundle
BJ> Sent by:
BJ> [email protected]
BJ> 
BJ> 
BJ> 
BJ> Hi OSGi Experts,
BJ> 
BJ> I have a question on using native code in OSGi.
BJ> 
BJ> ----
BJ> [Assumption]
BJ> 
BJ> - The native code "samplenative.so" exists in LD_LIBRARY_PATH on Linux.
BJ> - The jar file of bundle A does not "samplenative.so".
BJ> 
BJ> [Question]
BJ> 
BJ> - Can bundle A load the native code ?
BJ>                  by calling System.loadLibrary("samplenative").
BJ> ----
BJ> 
BJ> It seems to me that R4.2 core spec says 
BJ>                  "No, all native codes to be loaded must be in the JAR and
BJ>                  specified in the Bundle-NativeCode header".
BJ> 
BJ> Best regards, 
BJ> 
BJ> ---------------------
BJ> NTT Cyber Solutions Laboratories
BJ> 
BJ>      Ikuo YAMASAKI
BJ>         E-mail: [email protected]
BJ> TEL +81-46-859-8537  FAX +81-46-855-1282 
BJ> 
BJ> 
BJ> _______________________________________________
BJ> OSGi Developer Mail List
BJ> [email protected]
BJ> https://mail.osgi.org/mailman/listinfo/osgi-dev
BJ> 


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to