Kotlin replacement for javah : <p><a href="http://openjdk.java.net/jeps/313" rel="noreferrer"><code>javah</code> has been deprecated since JDK 8 and will be/has been removed in JDK 10</a>, and according to JEP 313 and the deprecation text, <code>javac</code> with the <code>-h</code> flag should be used instead:</p>

<blockquote>
  <p>Warning: The <code>javah</code> tool is planned to be removed in the next major JDK release. The tool has been superseded by the '-h' option added to <code>javac</code> in JDK 8. Users are recommended to migrate to using the <code>javac</code> '-h' option; see the javac man page for more information.</p>
</blockquote>

<p>The problem is, <code>javah</code> operates on compiled <code>.class</code> files, while <code>javac</code> operates on source files (i.e. <code>.java</code> files.)</p>

<p><code>javah</code> works fine with Kotlin and <a href="https://stackoverflow.com/questions/35552834/what-is-the-purpose-of-external-keyword-in-kotlin"><code>external</code></a> functions, since everything ends up compiled as Java bytecode, but since there aren't any Java source files when using Kotlin, I don't see any way <code>javac -h</code> could work.</p>

<p>Is there a <code>javah</code> replacement, or a workaround, for Kotlin?</p>
