Resources:
http://blog.csdn.net/wwj_748/article/details/28136061jni_ The simplest Java Call C + + code
http://blog.csdn.net/xyang81/article/details/41777471JNI/NDK Development Guide (i)--JNI development process and HelloWorld
?
Here are a few questions I've encountered:
- When I returned data from C + +, I found a problem. Eclipse dies directly. (Virtual machine dead)
- We have to build the DLL under the 64-bit system.
?
- Writing. Java (interface)
- Build. Class is automatically generated after compiling
- Java generation. h
- Open vs2010 write a. cpp file (or. c file)
- Generating. dll files
- Put the DLL file into the environment variable
- Load the library file in Eclipse, run the program
. java file
In VS, you need to add some header files under the JDK and need to be copied to the folder under Eclipse, which requires the IDE to be restarted.
. h file
. cpp Files
JNI Program Development