This chapter describes how to use the Java Native Interface (JNI) with a Java adapter for integration with a C++ application.
There are three basic approaches to enabling an application with a C++ API.
We will discuss the second option, and look at a sample adapter that utilizes this approach.
JNI is designed to allow Java applications to call C/C++ libraries. The following example uses Java to call a C++ API. The API is implemented to show how TwineBall, which is a Java adapter, could call a C++ API.