title: Apache ant javah task not working with jdk 10+
body: <p>We are shifting from jdk 1.8 to jdk13. In our build.xml we have </p>
  
  <pre><code>&lt;target name="generate-native-headers" depends="compile,resolve" description="Java to Native"&gt;
     &lt;javah class="com.zimbra.znative.IO" outputfile="${build.dir}/IO.h" classpathref="build.class.path"/&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>But java10+ is not supporting javah anymore so I found we can achieve this with javac "nativeheaderdir"  here -  <a href="https://ant.apache.org/manual/Tasks/javac.html#nativeheaderdir" rel="nofollow noreferrer">https://ant.apache.org/manual/Tasks/javac.html#nativeheaderdir</a></p>
  
  <p>So I tried to convert above javah task to javac as below</p>
  
  <pre><code>&lt;target name="generate-native-headers" depends="compile,resolve" description="Java to Native"&gt;
      &lt;javac srcdir="src/java/com/zimbra/znative" nativeHeaderDir="${build.dir}" classpathref="build.class.path" includes="src/java/com/zimbra/znative/IO.java"  /&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>Now the missing javah error gone, but I don't see IO.h file generated in my build directory.
  Can anyone help me, how to do this? Your help is really appreciated, thank you.</p>
  
  <p>Note: directory src/java/com/zimbra/znative have around 5-6 .java files. I mentioned an example for 1 file only. </p>