To support loading native code in OSGi bundles, the framework defines a specific header, Bundle-NativeCode, which defines the libraries that are available to the bundle via the
Bundle-NativeCode header defines one or more native libraries and a clause which states what operating systems and processor architectures are valid for each library. Calls to
System.loadLibrary will then look for libraries mentioned in this list and use only those found for the appropriate architecture. In effect, the
Bundle-NativeCode header replaces the
In the prior example, the
maths library was used for performing calculations. In an OSGi bundle, this could be packaged with the ...