問題描述
我正在使用 Eclipse 生成 JNI 頭文件.我查看了program filesjavajre6in
,發現了很多.exe和.dll文件,但是沒找到命令 javah
位于使用 JNI 創建與 C 庫的綁定的文檔中.
有什么幫助嗎?
I am using Eclipse to generate a JNI header file. I looked in program filesjavajre6in
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}
要運行該工具,請在包資源管理器中突出顯示 java 源文件并運行該工具.
To run the tool, highlight the java source file in package explorer and run the tool.
按 F5 刷新項目以查看新生成的文件.
Press F5 to refresh th project to see the newly generated file.
這篇關于如何在 Eclipse 中生成 JNI 頭文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!