I am implementing the simple JNI example , as given in
http://java.sun.com/docs/books/jni/html/start.html
At the second last step, when the C source is being compiled,
the following command is used:
C:\Program Files\Java\jdk1.6.0_21> cl -IC:\Program Files\Java\jdk1.6.0_21\include -IC:\Program Files\Java\jdl1.6.0_21\include\win32 -MD -LD Callbacks.c -FeCallbacks.dll
I get the following error:
"Cannot open include file "jni.h", No such file or directory exists."
But jni.h
does exist in java/jdk1.6.0_21/include folder.
How can I remove this error?
Since the path contain spaces u need to enclose the path inside "" like cl -IC:\Program Files\Java\jdk1.6.0_21\includ e -I"C:\Program Files\Java\jdl1.6.0_21\include\win32" -MD -LD Callbacks.c -FeCallb acks.dll
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With