开发者

Javah Not Recognizing class (A) mentioned in class (B) when operating on class B

I'm trying to get a jni header for class B, and class A sits in the same package, right next to it.

Class B contains native functions (for which I need the JNI Header)

and I use the command

javah -jni ClassB -classpath (path to jarfile containing all the classes necessary, including classA) 

and I get the response

"Couldn't find class w.x.y.z.ClassA"

Where w.x.y.z is the right package path for classA and classB.

Any suggestion开发者_JAVA百科s?


Try putting the options first, and only at the end the ClassB argument.

Also, the classpath should point to the root of the package hierarchy, not to the package directory. Then call it like this:

javah -jni -classpath library.jar w.x.y.z.ClassB
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜