Command:
javah -jni JavaHowTo
Result:
error: cannot access JavaHowTo
class file for JavaHowTo not found
javadoc: error -
I am using Eclipse.
Command syntax:
javah -d -classpath
outputdir
- The directory where the header file is generated.
classpath
- Contains an absolute path to the directory containing the root package.
fully_qualified_class
- The name of the class containing native methods WITHOUT .class
extension
The following file is generated:
C:\Users\John\workspace\JNITest\bin\com\canessa\john\jnitest\com_canessa_john_jnitest_CallMyCLib.h
The contents of the generated header file:
/* DO NOT EDIT THIS FILE - it is machine generated */
#include
/* Header for class com_canessa_john_jnitest_CallMyCLib */
#ifndef _Included_com_canessa_john_jnitest_CallMyCLib
#define _Included_com_canessa_john_jnitest_CallMyCLib
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_canessa_john_jnitest_CallMyCLib
* Method: helloInC
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_canessa_john_jnitest_CallMyCLib_helloInC
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif