目录结构:com/test/JniTest.java package : com.test javac com/test/JniTest.java javah -classpath ./ -jni com.test.JniTest 在当前目录下生成: com_test_JniTest.h