4.9. Writing Bundles That Contain Native Code

Because one of the intended uses of the residential gateway is to control low-level devices, in many circumstances we need to resort to native code to achieve certain functionality unavailable in the Java platform.

The framework allows a bundle to carry several dynamically linked native libraries for different operating system and processor environments, and at installation time attempts to match the appropriate native library with the underlying platform. If the framework succeeds in finding such a match, the native library will be linked into the Java virtual machine.

The framework learns the characteristics of the native platform from the OSGi environment properties established when the framework ...

Get Programming Open Service Gateways with Java Embedded Server™ Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.