I used the following guide to get started, http://cnd.netbeans.org/docs/jni/beginning-jni-win.html.
But when I try to generate the header file using the command below
JAVA_HOME\bin\javah.exe -o
HelloWorldNative.h -jni
-classpath PROJECTS_ROOT\HelloWorld\build\classes
helloworld.Main
I get the following error.
Error: Can’t recover from an I/O
error with the following message:
HelloWorldNative.h (access denied)
Thanks in advance 🙂
Looks to me like you are standing in a directory where you are not granted write access when you run javah.
Edit: What if you specify a full path to somewhere you know you have write access?