danishjuzdan / jnativehook

Automatically exported from code.google.com/p/jnativehook
0 stars 0 forks source link

JNativeHook won't compile on Windows 8 x64 #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Following the instructions here 
https://code.google.com/p/jnativehook/wiki/compiling I can't compile on Windows 
8 X64 with Java 1.7

What is the expected output? What do you see instead?
Compile. I get this console output when I run ant all:

  [javac] C:\JNativeH
.java
  [javac] C:\JNativeH

  [javac] C:\JNativeH
r.java
  [javac] C:\JNativeH
va
  [javac] C:\JNativeH
.java

mpile-native:
   [echo] Creating JN
  [javah] [No need to
i\org_jnativehook_Glo
   [echo] Compiling C
  [mkdir] Created dir
  [mkdir] Created dir
  [mkdir] Created dir
  [mkdir] Created dir
   [echo] Applying gc
NativeGlobals.c;jni\o
ws\NativeThread.c;win
icodeHelper.c
  [apply] In file inc
19:0:
  [apply] C:\JNativeH
ni.h: No such file or
  [apply] compilation
  [apply] gcc.exe: Fi
  [apply] gcc.exe: Fi
ry

ILD FAILED
\JNativeHook\build.xm

tal time: 3 seconds

What version of the product are you using? On what operating system?
JnativeHook 1.1.4 on Windows 8 x64 with Java 1.7 x64

Please provide any additional information below.

Original issue reported on code.google.com by torti....@gmail.com on 5 Jan 2014 at 8:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry, this is the error I am getting

compile-native:
     [echo] Creating JNI Headers...
    [javah] [No need to update file RegularFileObject[C:\JNativeHook\src\native\
jni\org_jnativehook_GlobalScreen.h]]
     [echo] Compiling C source...
    [mkdir] Created dir: C:\JNativeHook\bin\obj
    [mkdir] Created dir: C:\JNativeHook\bin\obj\common
    [mkdir] Created dir: C:\JNativeHook\bin\obj\jni
    [mkdir] Created dir: C:\JNativeHook\bin\obj\windows
     [echo] Applying gcc.exe on the following files: common\NativeErrors.c;commo
n\NativeGlobals.c;jni\org_jnativehook_GlobalScreen.c;windows\NativeHelpers.c;win
dows\NativeThread.c;windows\NativeToJava.c;windows\WinInputHelpers.c;windows\Win
UnicodeHelper.c
    [apply] In file included from C:\JNativeHook\src\native\common\NativeErrors.
c:19:0:
    [apply] C:\JNativeHook\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_45\include: No such file or directory
    [apply] gcc.exe: Files\Java\jdk1.7.0_45\include\win32: No such file or direc
tory

BUILD FAILED
C:\JNativeHook\build.xml:704: apply returned: 1

Total time: 3 seconds

Original comment by torti....@gmail.com on 5 Jan 2014 at 9:07

GoogleCodeExporter commented 9 years ago
Its because you have the JDK installed at a location with spaces in it.  IIRC 
you can edit the build.properties file and add quotes around -I"C:\Program 
Files\Java\jdk1.7.0_45\include" and -I"C:\Program 
Files\Java\jdk1.7.0_45\include\win32"

Original comment by a...@1stleg.com on 5 Jan 2014 at 9:34

GoogleCodeExporter commented 9 years ago
This has been addressed in 1.2 on github.

Original comment by a...@1stleg.com on 5 Jan 2014 at 9:34

GoogleCodeExporter commented 9 years ago

Original comment by a...@1stleg.com on 5 Jan 2014 at 11:32

GoogleCodeExporter commented 9 years ago
Thank you! Solved the problem!

Original comment by torti....@gmail.com on 5 Jan 2014 at 11:34