在JNI中使用它时出现Javah错误 [英] Javah error while using it in JNI

查看:90
本文介绍了在JNI中使用它时出现Javah错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

命令:

javah -jni JavaHowTo

结果:

error: cannot access JavaHowTo 
class file for JavaHowTo not found

javadoc: error - Class JavaHowTo not found.
Error: No classes were specified on the command line.  Try -help.

我已经正确设置了类路径,但我仍然得到这个 javah 错误。

I have set the class path correctly, but still i am getting this javah error.

任何解决方案都会有所帮助。

Any solution for this will be much helpful.

推荐答案

尝试

javah -jni com.example.JavaHowTo

其中 com.example 是您的包裹。

您还需要从包含 com / example / JavaHowTo.class

如如果你的结构是

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

/home/user

这篇关于在JNI中使用它时出现Javah错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆