简体   繁体   English

jnativehook构建失败jni.h未找到

[英]jnativehook build failed jni.h not found

I have been trying to build jnativehook from source. 我一直在尝试从源代码构建jnativehook。 I am using windows 7. I went through all the stages described on the website. 我正在使用Windows7。我经历了网站上描述的所有阶段。 Including change the environment variables Currently I am getting a build failed from the command prompt. 包括更改环境变量当前,我在命令提示符下构建失败。 I have pasted it below. 我已将其粘贴到下面。

Im not sure where the jnativehook files where supposed to extraxted too, so I have tried building the file while it is in different locations including the root directory, the java directory and inside the java folders. 我不确定jnativehook文件在哪里也应该外推,因此我尝试在文件位于根目录,java目录和java文件夹内的其他位置时构建文件。

I checked if jni.h is anywhere in the jnativehook (jhook) files and it isnt but there is a folder called jni one step up. 我检查了jnativehook(jhook)文件中的jni.h是否存在,但它是否存在,但是没有一个名为jni的文件夹。 There is jni.h file in the java directory but it doesnt say anywhere that I have to move and files out of java to jhook directory. java目录中有jni.h文件,但它没有说我必须移动的任何地方,并且文件都已从Java移到jhook目录。

Does anyone know if it supposed to extracted to specific place? 有人知道它是否应该提取到特定位置吗?

Also does anyone know what this error means and how to solve it? 还有人知道此错误的含义以及如何解决吗?

Any help appreciated : [apply] C:\\jhook\\src\\native\\common/NativeErrors.h:36:17: fatal error: jni.h : No such file or directory [apply] compilation terminated. 任何帮助表示赞赏:[应用] C:\\ jhook \\ src \\ native \\ common / NativeErrors.h:36:17:致命错误:jni.h:没有这样的文件或目录[应用]编译终止。 [apply] gcc.exe: Files\\Java\\jdk1.7.0_07\\include: No such file or directory [apply] gcc.exe: Files\\Java\\jdk1.7.0_07\\include\\win32: No such file or directory [应用] gcc.exe:Files \\ Java \\ jdk1.7.0_07 \\ include:没有这样的文件或目录[应用] gcc.exe:Files \\ Java \\ jdk1.7.0_07 \\ include \\ win32:没有这样的文件或目录

Try to use other versions of jdk such as jdk1.6.0 尝试使用其他版本的jdk,例如jdk1.6.0

Hope this helps. 希望这可以帮助。

Its because you installed java to a location with spaces in it. 这是因为您将Java安装到其中有空格的位置。 This shouldn't be a problem in version 1.2 or the trunk. 在版本1.2或主干中这应该不是问题。 If you need to compile 1.1, escape the space with a \\ or two in the java.include property. 如果需要编译1.1,请在java.include属性中使用\\或2来转义空格。 You can set that in the build.properties file. 您可以在build.properties文件中进行设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM