Where is jni.h
843829Jun 19 2001 — edited Aug 28 2001Hi
I was doing a tutorial by Beth Stearns at: http://java.sun.com/docs/books/tutorial/native1.1/index.html
I compiled my java file using javah -jni HelloWorld. which works fine. then i wrote the C file with the following code:
#include <jni.h>
#include "HelloWorld.h"
#include <stdio.h>
JNIEXPORT void JNICALL
Java_HelloWorld_displayHelloWorld(JNIEnv *env, jobject obj)
{
printf("Hello world!\n");
return;
}
However when i compile this file i get the error that it cannot find the 'jni.h' and 'HelloWorld.h' files.
when i looked under the directory i can find the 'HelloWorld.h' file but i cannot find the 'jni.h' file.
so really i have 2 questions:
why cannot the compiler find the HelloWorld.h file
and where is jni.h located.
regards
Qasim