即使在向gcc添加-l后也找不到jni.h

时间:2014-11-25 07:58:00

标签: java c java-native-interface

我收到了这个致命的错误

jni. h:No such file or directory
compilation terminated.

我输入的命令是

root@kali:/home/work#g++ -l/usr/lib/jvm/java-6-openjdk-i386/include -l/usr/lib/jvm/java-6-openjdk-i386/include/linux -o libhello.so Hello.c

1 个答案:

答案 0 :(得分:1)

应为-I/usr/lib/jvm/java-6-openjdk-i386/include/linux