1. Background
Many friends use the JNI functionality of Java in their daily work.
In the Linux environment, when compiling C files, you may report that you cannot find jni.h, and you cannot find jni_md.h errors.
2. Introduction
First of all, do not suspect that the JDK has an incomplete problem, which will let you go a lot of detours, and finally can not solve the problem.
Take my jdk1.7.0_75 for example, the location of the two header files is:
jni.h jdk1.7.0_75/include
Jni_md.h Jdk1.7.0_75/include/linux
3. The cause of the problem
The #inlcude<jni.h> header file is introduced into the file that will be compiled.
GCC did not find the two header files at compile time and therefore reported the missing hints.
4. SolutionManual introduction of jni.h and Jni_md.h two header files at GCC compile time
Use Gcc-i + header file archive location
Linux cannot find jni.h and cannot find jni_md.h cause and solution