Executing a command gccon ubuntu to generate a .a or .so file for JNI, we get below errors for openjdk 8 / oraclejdk8.
$gcc -I/usr/lib/jvm/java-8-openjdk-amd64/include -c MainImpl1.c -o MainImpl1.o
In file included from MainImpl1.c:1:0:
/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
^
compilation terminated.
$gcc -I/usr/lib/jvm/java-8-oracle/include -c MainImpl1.c -o MainImpl1.o
In file included from MainImpl1.c:1:0:
/usr/lib/jvm/java-8-oracle/include/jni.h:45:20: fatal error: jni_md.h: No such file or directory
^
compilation terminated.
I gave an example for generating a .a file, but the same problem is observed for generating a .so file.
But the same command gccworks for openjdk7 / oraclejdk7.
What is the problem?
source
share