1
我编译HelloWorld.c
成功。我更改为HelloWorld.class
所在的目录。 我在终端中输入javah -jni HelloWorld
来获取头文件。我有以下错误信息。问题是什么?我正在使用Mac OSX开发Android应用程序。麻烦为JNI生成头文件
error: cannot access HelloWorld
bad class file: ./HelloWorld.class
class file contains wrong class: Test.HelloWorld
Please remove or make sure it appears in the correct subdirectory of the classpath.
com.sun.tools.javac.util.Abort
javadoc: error - fatal error
2 errors
糟糕!我成功编译HelloWorld.java。我仍然在找出问题。 – user1301568 2012-07-06 19:06:55
export CLASSPATH = $ CLASSPATH:〜/ MyProject/bin/classes必须在执行javah -jni Test.HelloWorld之前完成。 – user1301568 2012-07-09 05:43:29