如何生成在Eclipse JNI头文件 [英] How to generate JNI header file in Eclipse

查看:292
本文介绍了如何生成在Eclipse JNI头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Eclipse来生成JNI头文件。我看着在程序文件\\ java的\\ JRE6 \\ BIN ,发现了很多的 .exe文件的.dll 的文件,但我找不到这是在文档中使用JNI创建绑定到C库的命令 JAVAH 。结果
任何帮助吗?

I am using Eclipse to generate a JNI header file. I looked in program files\java\jre6\bin and found a lot of .exe and .dll files, but I couldn't find the command javah which was in the documentation for using JNI to create bindings to C libraries.
any help?

感谢

推荐答案

使用以下面板定义javah.exe新的外部工具。

Use the following panel to define a new external tool for javah.exe.

点位置的javah.exe工具。

Point "Location" to the javah.exe tool.

设置工作目录,以

${workspace_loc:/${project_name}/bin}

设置参数为:

-classpath ${project_classpath} -v -d ${workspace_loc:/${project_name}/src} ${java_type_name}

要运行该工具,突出Package Explorer中的Java源文件并运行此工具。

To run the tool, highlight the java source file in package explorer and run the tool.

preSS F5刷新日项目看到新生成的文件。

Press F5 to refresh th project to see the newly generated file.

这篇关于如何生成在Eclipse JNI头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆