JNI - “Cannot open include file: 'jni_md.h'”

后端 未结 5 1550
走了就别回头了
走了就别回头了 2020-12-18 17:32

This sample program is meant to call a native method written in C.

Java Code

class HelloWorld {

    private native voi         


        
5条回答
  •  既然无缘
    2020-12-18 18:23

    I suspect that jni.h is trying to #include , which is then failing because you haven't added its location to your include path.

    Try adding both of these entries to your C compiler's include path:

    • C:\Program Files\Java\jdk1.7.0\include
    • C:\Program Files\Java\jdk1.7.0\include\win32

    The win32 path might not be necessary, depending on how jni.h is set up.

提交回复
热议问题