android - javah 找不到我的班级 [英] android - javah doesn't find my class
本文介绍了android - javah 找不到我的班级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在使用 javah
为 JNI 生成 C 头文件时遇到问题.
I am having troubles generating the C header file for JNI using javah
.
这是我在 <project-dir>in
目录中使用的脚本:
Here's the script I use while standing in the <project-dir>in
directory:
javah -classpath C:PROGRA~2Androidandroid-sdkplatformsandroid-8android.jar com.test.JniTest
作为回报我得到:
ERROR: Could not find class file for 'com.test.JniTest'.
即使 JniTest
类肯定在 com est
中.
Even though the class JniTest
certainly is in com est
.
我做错了什么?
推荐答案
你指定类路径包含only android.jar
.
您还需要包括存储类的位置.在您的情况下,它是当前目录,因此您需要使用 .
(在 Windows 上由 ;
分隔).调用应如下所示:
You also need to include the location where your classes are stored. In your case it is the current directory, so you need to use .
(separated by ;
on Windows). The invocation should look like this:
javah -classpath C:PROGRA~2Androidandroid-sdkplatformsandroid-8android.jar;. com.test.JniTest
这篇关于android - javah 找不到我的班级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文