javah可以在Eclipse中配置成为External Tools,选择External Tools Configurations,配置如下,经过测试通过。

Location:

${system_path:javah}

Working Directory:

${project_loc}

Arguments:

-classpath "${project_loc}/bin/classes;C:\Android\android-sdk\platforms\android-4.4.2\android.jar;" -d "${project_loc}/jni" -jni ${java_type_name}

注: android.jar路径需要换成自己SDK的路径。

05-11 22:08