1
votes

I have been trying to build jnativehook from source. I am using windows 7. I went through all the stages described on the website. 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.

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. 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.

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. [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

2
Have you found a solution?Andres

2 Answers

0
votes

Try to use other versions of jdk such as jdk1.6.0

Hope this helps.

0
votes

Its because you installed java to a location with spaces in it. This shouldn't be a problem in version 1.2 or the trunk. If you need to compile 1.1, escape the space with a \ or two in the java.include property. You can set that in the build.properties file.