Search code examples
java-native-interfaceruntime-error

JNI programming : error - Class jni not found


An error occur while running this code:

$ javac HelloWorld.java
$ javah jni HelloWorld
error: cannot access jni
class file for jni not found
javadoc: error - Class jni not found.
2 errors

how could I overcome it? please give me a solution.. thanks.


Solution

  • Use javah -jni instead of javah jni.