O'Reilly logo

Mastering Eclipse Plug-in Development by Dr. Alex Blewitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Native Code and Fragment Bundles

OSGi has support for loading native code in an application, which may be used to provide access to platform-specific functionality or for performance reasons. This chapter will present an overview of the Java Native Interface, and then cover how native code can be bundled in with plug-ins. It will also cover how fragment bundles can provide extensions to bundles in an OSGi runtime, such as native code libraries and Java patches.

Native code and Eclipse

The Java Native Interface (JNI) is a standard way in which any Java program can interact with native code. The process for working with native code can be summarized as follows:

  1. Write a Java class with a native method.
  2. Compile the Java class as normal.
  3. Run ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required