Contents Prev Next

7 Building the Library


Building the library has three main parts to it. First, we need to create a real C file from the javah generated stubs file(s). We do this by placing an "include StubPreable.h" into the stub C file followed by one or more of the actual stub files. Once we have this C stub file we move on to building our native method C implementation. With these C files in hand we compile and link them into a dynamically loadable library. Now we're ready to run our Java code that depends on native C functions.

Contents Prev Next

Implementing Native Methods

Generated with CERN WebMaker