Javah error while using it in JNI

前端 未结 14 1676
离开以前
离开以前 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:59

    I encountered the same error and using http://www.inonit.com/cygwin/jni/helloWorld/header.html link I was able to successfully generate the .h file. I used the following command

    C:\Program Files\Java\jdk1.6.0_21\bin>javah -d C:\Prachi\Android\Workspace_QP_re
    structure\HelloWorld\bin\example\jni -classpath C:\Prachi\Android\Workspace_QP_r
    estructure\HelloWorld\bin example.jni.HelloWorld
    

    here example.jni is my package name and C:\Prachi\Android\Workspace_QP_re structure\ is where my eclipse workspace path.

    Hope this helps you

提交回复
热议问题