We are shifting from jdk 1.8 to jdk13. In our build.xml we have
<target name="generate-native-headers" depends="compile,resolve" description="Java to Native">
<javah class="com.zimbra.znative.IO" outputfile="${build.dir}/IO.h" classpathref="build.class.path"/>
</target>
But java10+ is not supporting javah anymore so I found we can achieve this with javac "nativeheaderdir" here - https://ant.apache.org/manual/Tasks/javac.html#nativeheaderdir
So I tried to convert above javah task to javac as below
<target name="generate-native-headers" depends="compile,resolve" description="Java to Native">
<javac srcdir="src/java/com/zimbra/znative" nativeHeaderDir="${build.dir}" classpathref="build.class.path" includes="src/java/com/zimbra/znative/IO.java" />
</target>
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.
Note: directory src/java/com/zimbra/znative have around 5-6 .java files. I mentioned an example for 1 file only.