title: Generate JNI header files for class files in JDK 10
body: <p>An integral part of the Java Native Interface (JNI), is the bridging of JVM code and native code through C headers. The way to generate these header files used to be quite straight forward: simply call the command line utility <code>javah</code> on class files. This process would then generate prototypes for any method marked with the <code>native</code> modifier.</p>
  
  <p>As of Java 10 however, the <code>javah</code> utility <a href="https://bugs.openjdk.java.net/browse/JDK-8166218" rel="noreferrer">has been removed</a>, and its suggested replacement is a new flag "-h" to javac. The replacement works fine if one has the Java source files available, however falls short in cases where only compiled class files are available. (The issue that sparked this question is that I'm trying to generate JNI bindings from Scala sources. My current approach has been to compile them first and then run javah over the resulting class files.)</p>
  
  <p>In a situation where only compiled class files are available, is there a way to generate C header files, similar to the way <code>javah</code> used to?</p>