Convert existing C++ (.h and .cpp) files to java for Android
<p>I am developing for Android under Eclipse. I have some c++ (.h and .cpp) files that I wish to use in my Android application. I have read <a href="http://home.pacifier.com/~mmead/jni/cs510ajp/index.html" rel="nofollow">Programmming in C/C++ with the Java Native Interface</a> and now I know how to make .so file and import it to Android. But the main problem is that:</p>

<p><strong>Is there any tool that converts c++ (.h and .cpp) file to java style files which I can compile and create .so library ? I have heard about JNI - javah and javac can that tools help me and if they can so HOW ?</strong></p>

<hr>

<p><strong>Edited:</strong></p>

<p><strong>javah is a useful tool that creates a C-style header file from a given class. The resulting header file describes the class file in C terms. Although it is possible to manually create the header file, this is almost always a bad idea. javah knows exactly how Java types and objects map into C types. For example, an int in Java maps to a long in C, and a long in Java maps to a 64-bit value, _int64, in native code. How to use this javah?</strong></p>

<p><strong>Anybody have expiarance of how to use functions that are implemented in .so library in android application ? If anybody have code examples or useful articles links please give.</strong></p>

<p>Thanks in advance !</p>
