Javah error while using it in JNI

前端 未结 14 1712
离开以前
离开以前 2020-12-01 05:27

Command:

javah -jni JavaHowTo

Result:

error: cannot access JavaHowTo 
class file for JavaHowTo not found

javadoc: error -          


        
14条回答
  •  误落风尘
    2020-12-01 05:40

    Try

    javah -jni com.example.JavaHowTo
    

    where com.example is your package.

    You also need to run javah from the directory containing com/example/JavaHowTo.class

    e.g. if your structure is

    /home/user/com/example/JavaHowTo.class
    

    run javah from

    /home/user
    

提交回复
热议问题