Richard Richard - 8 months ago 40
Java Question

how to make jni.h be found?

In Ubuntu 12.04, I have jdk7 from sun/oracle installed. When

locate jni.h
, it prints multiple locations


In the header file generated by JDK, there is
include <jni.h>
, and currently it complains

fatal error: jni.h: No such file or directory.

In my
, there is no specification of locations where
is. And I am asking if possible to configure certain system parameter to make path of
) to be known when being compiled.

jdb jdb

You have to tell your compiler where is the include directory. Something like this:

gcc -I/usr/lib/jvm/jdk1.7.0_07/include

But it depends on your makefile.