Search code examples
netbeansjava-8java-native-interfacewindows-7-x64

javah.exe not included in Windows JDK 8?


I'm trying to learn JNI on Windows 7 64-bit, but JDK 8 does not include javah.exe. I tried both the 32-bit and 64-bit versions. The Oracle documentation shows that javah is part of JDK 8 and doesn't make any platform distinction. Is there a separate download for JNI?

Also, the tutorials that I could find on JNI on Windows are pretty old - is there a newer way to do JNI in Windows, or does anyone have any suggestions for current Windows JNI Tutorials? NetBeans is my preferred IDE, but I'm not exclusive.


Solution

  • Hej Kevin, there is no seperate download needed for JNI and javah.exe is included in your JDK, search for it in %JAVA_HOME%/bin (if you don't have set this environment variable, look into C:\Program Files\Java\jdk1.8.0_121\bin or the version you have). Make sure you have downloaded the JDK, not JRE. And, the best JNI tutorial to start with is indeed that one, at least for me it was.