目錄結構:com/test/JniTest.java package : com.test javac com/test/JniTest.java javah -classpath ./ -jni com.test.JniTest 在當前目錄下生成: com_test_JniTest.h