Javah tool error: Could not find class file for hellojni

后端 未结 6 1266
無奈伤痛
無奈伤痛 2020-12-13 13:46

I am trying to create a header file using javah tool from command line on windows 7 OS but i am failing all the time.

I have followed different ways and even read t

6条回答
  •  佛祖请我去吃肉
    2020-12-13 14:11

    I also faced the same problem when trying to compile and generate the C/C++ header in two steps for a Java Native Interface (JNI) implementation (I suspect that is what your trying to do from the file names). What solved it for me was to merge the two steps into one using the following command:

    javac YOUR_CLASS_FILE_NAME.java -h .
    

    The dot (.) includes the current path. This command can only be run as of Java 8.

提交回复
热议问题