Tag: header files

使用-h选项时,javac“没有源文件”

我正在尝试使用JNI和JDK 9.我有一个类NativeTest.java ,如下所示: public class NativeTest { static { System.loadLibrary(“hello”); } private native void sayHello(); public static void main(String[] args) { new NativeTest().sayHello(); } } 我编译该类,然后使用javah NativeTest生成头文件。 发出javah ,我收到此警告: Warning: The javah tool is planned to be removed in the next major JDK release. The tool has been superseded by the ‘-h’ option added to […]