Coder Social home page Coder Social logo

kwhat / jnativehook Goto Github PK

View Code? Open in Web Editor NEW
1.7K 56.0 341.0 6.89 MB

Global keyboard and mouse listeners for Java.

License: Other

Java 68.60% C 30.32% CMake 1.07%
mouse-listeners native-events jnativehook java c keyboard-listeners global-hotkeys jni global-events

jnativehook's People

Contributors

amsangi avatar contagnas avatar cynos07 avatar dargonforce avatar degubi avatar fabmars avatar fd- avatar freddity avatar ivanskodje avatar kwhat avatar laiqeua avatar leif81 avatar peslys avatar sogomn avatar spedwards avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jnativehook's Issues

NativeSystem locale bug

NativeSystem class has a bug. Turkish I problem. Your toString() method inside the Family should call lowercase with Locale.ROOT argument. Otherwise Turkish Locale users will get
"Unable to extract the native library /org/jnativehook/lib/wındows/x86/JNativeHook.dll!"
for private static void loadNativeLibrary() method.

Notice the lowercase Turkish I, which is "ı" instead of "i".

See the javadoc of String.lowercase():

This method is locale sensitive, and may produce unexpected results if used for strings that are intended to be interpreted locale independently. Examples are programming language identifiers, protocol keys, and HTML tags. For instance, "TITLE".toLowerCase() in a Turkish locale returns "tıtle", where 'ı' is the LATIN SMALL LETTER DOTLESS I character. To obtain correct results for locale insensitive strings, use toLowerCase(Locale.ROOT).

License agreement overkill

I'm not sure whose idea it was to print out the entire license agreement to the console every time I run my program. It is very annoying. The license is already printed in every file. No other library that I've used has done this. Please remove it.

Here is what it outputs every time:

JNativeHook: Global keyboard and mouse hooking for Java.
Copyright (C) 2006-2015 Alexander Barker.  All Rights Received.
https://github.com/kwhat/jnativehook/

JNativeHook is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

JNativeHook is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Block mouse events

Is it possible to block the mouse/keyboard events by this library?

E.g.:

Receive the mouse/keyboard events, process them through Java code and pass them again to the OS

Best regards,

Benjamin

Disable Logging?

I can not get rid of the detailed logging messages for every event like

Jun 20, 2014 3:43:31 PM java.lang.ClassLoader$NativeLibrary load
INFORMATION: hook_get_auto_repeat_delay [53]: SPI_GETKEYBOARDDELAY: 1.

Tried

java.util.logging.Logger.getLogger("org.jnativehook").setLevel(Level.OFF);

at several steps during initialization to no avail.

Add compiled JAR to the repo?

Hello! Thanks for all your effort on this project. It's incredibly useful!

Is there any chance you can add a compiled JAR into a dist/ directory or something so we can simply download it directly rather than having to install and configure Ant and whatnot?

Support For Joysticks

Would support for joysticks be possible? I noticed that in your response to #7 you mentioned potential future evdev support. Would joystick support on linux come for free with this?

Wrong mouse events on some computers

JNativeHook starting from version 1.2.0rc5 sometimes returns wrong Mouse Drag event instead Mouse Click and Mouse Move. JNativeHook sometimes "swallows" Mouse Release or Mouse Press event.

There is link to video explaining the bug https://www.dropbox.com/s/ypv4a2d31qppc9d/BUG.%20JNativeHook%20D%26D.mov?dl=0

First time I saw this bug on virtual Windows 8.1 running on Mac OS X 10.10.1 using Parallels Desktop 10. It was hard to repeat on real (not virtual) Windows machines. I was able repeat it using Cpukiller3 (http://cpukiller3.software.informer.com/) with value near 100% on Windows XP on Pentium 4, Windows 7 64-Bits on Pentium i5. Exception was Windows 8.1 running on Intel Core i7 2 GHz.

[1.2 RC2] JVM Crash

Hi,

I've tried to use JNativeHook in my eclipse e4/swt application, but I always catch JVM crash with SIGSEGV in pthread.

I advise you to look into org.eclipse.swt.internal.gtk.OS._gtk_main_do_event native implementation to find out how it uses pthread_mutex_lock and how this usage may correlate with your usage.

Signed char somewhere in MouseMotion

Hi!

I think there is a problem somewhere in MouseMotion with a signed char.
When I put the mouse on the top (for exemple), the X (or the Y) axis return sometimes 0, 1, ... or 65535, 65534, ...

" Unhandled Darwin event" on OSX Yosemite

Hi,

i have just found this project and it seems to be what i need. I have just compiled the demo-application but i only get warning messages in the console: hook_event_proc [737]: Unhandled Darwin event! (0X1D) but no event is logged in the demo-window. What is happening here? Can it be fixed?

thanks in advance

NoClassDefFoundError

after immediate

        GlobalScreen.unregisterNativeHook();
        GlobalScreen.registerNativeHook();

sometimes (around one in three times) there occures following exception

Exception in thread "Thread-1" java.lang.NoClassDefFoundError: org/jnativehook/NativeHookException.(SLjava/lang/String;)V

a workaround is to wait a little bit after the unregister.

        GlobalScreen.unregisterNativeHook();
        Thread.sleep(200);
        GlobalScreen.registerNativeHook();

Command key can sometimes always be a modifier (mac)

On Mac OS-X there are times when command key is always a modifier on every key and mouse event. It might not start on the first event, but once it starts it will stay as a modifier key on every event after that until the program ends. I have not been about to figure out what triggers it to start. It seems to happen about 10-20% of the time.

I have not seen this in the windows version.

This is in version 2.0.0.

Cannot compile from source code

Hi Alex,

I'm trying to compile the 1.2 beta 2 from source code because I want to add the USE_QUIET flag. However I kept failing compile it even though I did as the instruction told.

I tried on both OS X 10.9.4 and Ubuntu 12.04, they both complain that

configure-libuiohook:
    [echo] Configuring libUIOHook source...
    [mkdir] Created dir: /vagrant/jnativehook-1.2-2.0-Beta2/bin/libuiohook
BUILD FAILED
/vagrant/jnativehook-1.2-2.0-Beta2/build.xml:367: configure doesn't support the "path" attribute

I'm not sure where locates the problem as I'm totally novice as to Ant. Would you like to help me figure out the issue or release a version that we can toggle the copyright information?

Supress events

Is it possible to capture an event and suppress it, so that the original application does not receive it?

crash on ubuntu 14.04 64 bits

here is the error :

/usr/lib/jvm/java-7-openjdk-amd64/bin/java: symbol lookup error: /tmp/libJNativeHook-2.0.0.so: undefined symbol: hook_set_logger_proc

fatal error

//#
//# A fatal error has been detected by the Java Runtime Environment:
//#
//# SIGSEGV (0xb) at pc=0x00007f10723327a4, pid=5753, tid=139708605572864
//#
//# JRE version: 7.0_25-b30
//# Java VM: OpenJDK 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
//# Problematic frame:
//# C [libXt.so.6+0x1e7a4] XtDestroyWidget+0x584
//#
//# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
//#
//# If you would like to submit a bug report, please include
//# instructions on how to reproduce the bug and visit:
//# https://bugs.launchpad.net/ubuntu/+source/openjdk-7/
//# The crash happened outside the Java Virtual Machine in native code.
//# See problematic frame for where to report the bug.
//#

--------------- T H R E A D ---------------

Current thread (0x00007f1064011000): JavaThread "JNativeHook Native Hook" [_thread_in_native, id=5777, stack(0x00007f10714ea000,0x00007f1071ceb000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00007f0f57fff010

Registers:
RAX=0x00007f0f5803f010, RBX=0x00007f10c83445a0, RCX=0x00007f1072585378, RDX=0xffffffffffff8000
RSP=0x00007f1071ce9be0, RBP=0x00007f10c83445a0, RSI=0x000000000000800c, RDI=0x0000000000000270
R8 =0x0000000000008001, R9 =0x0000000000000000, R10=0x00007f10c82b7130, R11=0x00007f10afd7a599
R12=0x00007f10c833dfc0, R13=0x00007f1072585378, R14=0x00007f1072585378, R15=0x0000000000000000
RIP=0x00007f10723327a4, EFLAGS=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000006
TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007f1071ce9be0)
0x00007f1071ce9be0: 0000000000000006 00007f10c83445a0
0x00007f1071ce9bf0: 00007f1072585378 0000000000000400
0x00007f1071ce9c00: 00007f10c833dfc0 00007f1071ce9cac
0x00007f1071ce9c10: 0000000000000000 00007f1072332cca
0x00007f1071ce9c20: 00007f107258535a 00007f10afced822
0x00007f1071ce9c30: 00007f1064002d80 000000005e9dcd08
0x00007f1071ce9c40: 0000000000000000 0000000000000000
0x00007f1071ce9c50: 0000015500000154 00007f1072786348
0x00007f1071ce9c60: 0000000000000000 0000000000000400
0x00007f1071ce9c70: 0000000000000249 00007f106401cd70
0x00007f1071ce9c80: 0000000000000006 00007f107257d351
0x00007f1071ce9c90: 00007f1071ce9cac 0000000000000000
0x00007f1071ce9ca0: 0000000171ce9e10 0000000000000000
0x00007f1071ce9cb0: 0000000000000400 0000000000000020
0x00007f1071ce9cc0: 00000143ade77749 00007f107257dcdb
0x00007f1071ce9cd0: 00007f1064001cc0 00007f10ad7fc86a
0x00007f1071ce9ce0: 000000000000000b ffffffffffffffff
0x00007f1071ce9cf0: 0000000000000000 0000000800000001
0x00007f1071ce9d00: 0000000000000001 00000188ffffffff
0x00007f1071ce9d10: 0000000000000000 00007f1064001cc0
0x00007f1071ce9d20: 0000000000000000 00007f10640111d8
0x00007f1071ce9d30: 0000000000000000 00007f1064001cc0
0x00007f1071ce9d40: 0000000052dca5c0 000000000005057b
0x00007f1071ce9d50: 0000000000000000 00007f1071ce9e10
0x00007f1071ce9d60: 00007f106401cd70 0000000000000020
0x00007f1071ce9d70: 0000000000000020 00007f106401e0d8
0x00007f1071ce9d80: 00007f106401e0e4 00007f10af8b7a14
0x00007f1071ce9d90: 00007f10640008c0 00007f10640008c0
0x00007f1071ce9da0: 00007f10640008c0 00007f106400fae0
0x00007f1071ce9db0: 00007f107257d700 00007f10640008c0
0x00007f1071ce9dc0: 0000000000001000 00007f10640008c0
0x00007f1071ce9dd0: 00007f106400fae0 00007f106401e0d0

Instructions: (pc=0x00007f10723327a4)
0x00007f1072332784: b6 8e 00 00 00 66 41 39 f0 0f 8d 3d 02 00 00 48
0x00007f1072332794: 8b 45 18 49 0f bf d0 41 83 c0 01 bf 70 02 00 00
0x00007f10723327a4: 4c 89 24 d0 83 85 88 00 00 00 01 66 44 89 85 8c
0x00007f10723327b4: 00 00 00 c6 85 1d 01 00 00 01 e8 4d 33 ff ff 48

Register to memory mapping:

RAX=0x00007f0f5803f010 is an unknown value
RBX=0x00007f10c83445a0 is an unknown value
RCX=0x00007f1072585378: <offset 0xb378> in /tmp/libJNativeHook_8024035117661756703.so at 0x00007f107257a000
RDX=0xffffffffffff8000 is an unknown value
RSP=0x00007f1071ce9be0 is pointing into the stack for thread: 0x00007f1064011000
RBP=0x00007f10c83445a0 is an unknown value
RSI=0x000000000000800c is an unknown value
RDI=0x0000000000000270 is an unknown value
R8 =0x0000000000008001 is an unknown value
R9 =0x0000000000000000 is an unknown value
R10=0x00007f10c82b7130 is an unknown value
R11=0x00007f10afd7a599: <offset 0xb4599> in /usr/lib/x86_64-linux-gnu/libX11.so.6 at 0x00007f10afcc6000
R12=0x00007f10c833dfc0 is an unknown value
R13=0x00007f1072585378: <offset 0xb378> in /tmp/libJNativeHook_8024035117661756703.so at 0x00007f107257a000
R14=0x00007f1072585378: <offset 0xb378> in /tmp/libJNativeHook_8024035117661756703.so at 0x00007f107257a000
R15=0x0000000000000000 is an unknown value

Stack: [0x00007f10714ea000,0x00007f1071ceb000], sp=0x00007f1071ce9be0, free space=8190k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libXt.so.6+0x1e7a4] XtDestroyWidget+0x584

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x00007f10c8009000 JavaThread "DestroyJavaVM" [_thread_blocked, id=5758, stack(0x00007f10d0f59000,0x00007f10d105a000)]
0x00007f106401e800 JavaThread "JNativeHook Native Dispatch" [_thread_blocked, id=5778, stack(0x00007f10713e9000,0x00007f10714ea000)]
=>0x00007f1064011000 JavaThread "JNativeHook Native Hook" [_thread_in_native, id=5777, stack(0x00007f10714ea000,0x00007f1071ceb000)]
0x00007f10c82e9000 JavaThread "AWT-XAWT" daemon [_thread_in_native, id=5776, stack(0x00007f1072787000,0x00007f1072888000)]
0x00007f10c82a8000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=5775, stack(0x00007f10b4067000,0x00007f10b4168000)]
0x00007f10c811b000 JavaThread "Service Thread" daemon [_thread_blocked, id=5773, stack(0x00007f10b49a4000,0x00007f10b4aa5000)]
0x00007f10c8118800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=5772, stack(0x00007f10b4aa5000,0x00007f10b4ba6000)]
0x00007f10c8116000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=5771, stack(0x00007f10b4ba6000,0x00007f10b4ca7000)]
0x00007f10c8113800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5770, stack(0x00007f10b4ca7000,0x00007f10b4da8000)]
0x00007f10c80ba800 JavaThread "Finalizer" daemon [_thread_blocked, id=5769, stack(0x00007f10b5489000,0x00007f10b558a000)]
0x00007f10c80b8000 JavaThread "Reference Handler" daemon [_thread_blocked, id=5768, stack(0x00007f10b558a000,0x00007f10b568b000)]

Other Threads:
0x00007f10c80b0000 VMThread [stack: 0x00007f10b568b000,0x00007f10b578c000] [id=5767]
0x00007f10c812e000 WatcherThread [stack: 0x00007f10b48a3000,0x00007f10b49a4000] [id=5774]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
PSYoungGen total 74368K, used 28055K [0x00000007ad000000, 0x00000007b2300000, 0x0000000800000000)
eden space 63744K, 44% used [0x00000007ad000000,0x00000007aeb65ca8,0x00000007b0e40000)
from space 10624K, 0% used [0x00000007b18a0000,0x00000007b18a0000,0x00000007b2300000)
to space 10624K, 0% used [0x00000007b0e40000,0x00000007b0e40000,0x00000007b18a0000)
ParOldGen total 169984K, used 0K [0x0000000707000000, 0x0000000711600000, 0x00000007ad000000)
object space 169984K, 0% used [0x0000000707000000,0x0000000707000000,0x0000000711600000)
PSPermGen total 21248K, used 5830K [0x00000006fca00000, 0x00000006fdec0000, 0x0000000707000000)
object space 21248K, 27% used [0x00000006fca00000,0x00000006fcfb1b78,0x00000006fdec0000)

Card table byte_map: [0x00007f10cd4ca000,0x00007f10cdce6000] byte_map_base: 0x00007f10c9ce5000

Polling page: 0x00007f10d1078000

Code Cache [0x00007f10c5000000, 0x00007f10c5270000, 0x00007f10c8000000)
total_blobs=379 nmethods=75 adapters=257 free_code_cache=48580Kb largest_free_block=49720704

Compilation events (10 events):
Event: 698.219 Thread 0x00007f10c8116000 70 java.lang.String::length (6 bytes)
Event: 698.220 Thread 0x00007f10c8116000 nmethod 70 0x00007f10c5082510 code [0x00007f10c5082640, 0x00007f10c50826b8]
Event: 1314.837 Thread 0x00007f10c8118800 71 java.lang.CharacterData::of (120 bytes)
Event: 1314.837 Thread 0x00007f10c8118800 nmethod 71 0x00007f10c5091e50 code [0x00007f10c5091fa0, 0x00007f10c5092078]
Event: 1360.158 Thread 0x00007f10c8116000 72 java.util.concurrent.locks.ReentrantLock::lock (8 bytes)
Event: 1360.159 Thread 0x00007f10c8116000 nmethod 72 0x00007f10c5091950 code [0x00007f10c5091ac0, 0x00007f10c5091c68]
Event: 1372.718 Thread 0x00007f10c8118800 73 java.nio.Buffer::position (43 bytes)
Event: 1372.719 Thread 0x00007f10c8118800 nmethod 73 0x00007f10c5091710 code [0x00007f10c5091840, 0x00007f10c50918d8]
Event: 1443.061 Thread 0x00007f10c8116000 74 java.lang.String::getChars (62 bytes)
Event: 1443.063 Thread 0x00007f10c8116000 nmethod 74 0x00007f10c5091310 code [0x00007f10c5091460, 0x00007f10c5091598]

GC Heap History (0 events):
No events

Deoptimization events (9 events):
Event: 213.071 Thread 0x00007f106401e800 Uncommon trap -42 fr.pc 0x00007f10c5076d04
Event: 213.190 Thread 0x00007f106401e800 Uncommon trap -42 fr.pc 0x00007f10c5076d04
Event: 213.191 Thread 0x00007f106401e800 Uncommon trap -42 fr.pc 0x00007f10c5076d04
Event: 214.152 Thread 0x00007f106401e800 Uncommon trap -42 fr.pc 0x00007f10c5076d04
Event: 243.813 Thread 0x00007f10c82e9000 Uncommon trap -83 fr.pc 0x00007f10c507c6c4
Event: 243.813 Thread 0x00007f106401e800 Uncommon trap -83 fr.pc 0x00007f10c507469c
Event: 243.813 Thread 0x00007f106401e800 Uncommon trap -83 fr.pc 0x00007f10c5074328
Event: 243.813 Thread 0x00007f106401e800 Uncommon trap -83 fr.pc 0x00007f10c50763a8
Event: 434.434 Thread 0x00007f106401e800 Uncommon trap -83 fr.pc 0x00007f10c507d7dc

Internal exceptions (10 events):
Event: 0.146 Thread 0x00007f10c8009000 Threw 0x00000007ad287e00 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235
Event: 0.147 Thread 0x00007f10c8009000 Threw 0x00000007ad28c7a0 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235
Event: 0.148 Thread 0x00007f10c8009000 Threw 0x00000007ad290cf8 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235
Event: 0.152 Thread 0x00007f1064011000 Threw 0x00000007ad3bec10 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235
Event: 0.155 Thread 0x00007f10c8009000 Threw 0x00000007ad295118 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235
Event: 0.156 Thread 0x00007f10c8009000 Threw 0x00000007ad29c090 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235
Event: 0.156 Thread 0x00007f1064011000 Threw 0x00000007ad3c2fb8 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235
Event: 0.156 Thread 0x00007f10c8009000 Threw 0x00000007ad29f548 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235
Event: 10.119 Thread 0x00007f106401e800 Threw 0x00000007ad50cbf8 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235
Event: 242.663 Thread 0x00007f106401e800 Threw 0x00000007ad569560 at /build/buildd/openjdk-7-7u25-2.3.10/build/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1235

Events (10 events):
Event: 243.817 loading class 0x00007f1060005bf0 done
Event: 243.817 loading class 0x00007f10c82c2ea0 done
Event: 243.817 loading class 0x00007f10c82c0600
Event: 243.817 loading class 0x00007f10c82c0600 done
Event: 243.817 loading class 0x00007f10c82bec20
Event: 243.817 loading class 0x00007f10c82bec20 done
Event: 243.817 loading class 0x00007f106000cce0
Event: 243.817 loading class 0x00007f106000cce0 done
Event: 434.434 Thread 0x00007f106401e800 DEOPT PACKING pc=0x00007f10c507d7dc sp=0x00007f10714e88f0
Event: 434.434 Thread 0x00007f106401e800 DEOPT UNPACKING pc=0x00007f10c5039145 sp=0x00007f10714e8730 mode 2

1.2 beta 2, thread cannot exit properly

The listener thread cannot exit properly when the main thread exits, even though the hook has already been unregistered before main thread exits.

This issue did not come up with 1.1.4 as far as I tested.

Compiling on Windows

Hi,

I'm assuming you decided to move from https://code.google.com/p/jnativehook/ to here?

I'm currently trying to compile jNativeHook on Windows in order to try to debug the "known" issue (in 1.1.4) where after a while the hook decides not to work anymore. Interestingly enough, when it decides to break, global shortcuts such as F2 to rename files don't work anymore (as well as right-clicking on a file and using the rename option, which is pretty weird...)

I haven't been able to build using the ant build files, thus I'm wondering on what platform you're primarily working and if it is a mistake on my part or it is simply that Windows isn't supported at the moment?

Compilation Error?

Windows 8.1 64 bit.

I've done everything asked for in the compilation instructions however when running msys2 shell to compile with ant all I get as far as

configure:3580: checking whether the C compiler works
with results with no.
ultimately with
configure:3651: error: C compiler cannot create executables

config.log states this was because

configure:3602: clang -march=armv6j -mfpu=vfp -mfloat-abi=hard -Os -g -pipe -fomit-frame-pointer -flto -ffat-lto-objects -fno-stack-protector -Wl,--as-needed,-O1 -flto conftest.c >&5
clang.exe: warning: optimization flag '-ffat-lto-objects' is not supported
clang.exe: error: 'i686-pc-windows-gnu': unable to pass LLVM bit-code files to linker

using latest LLVM, 3.6.1

Missing file for JNativeHook.dll lib compilication

Hi, I'm trying to compile the JNativeHook.dll lib file on windows with C++ but I'm having some missing files.

Here's the missing files names:

  • org_jnativehook_GlobalScreen.h
  • uiohook.h
  • stdbool.h

Please let me know where I can get those files from.

Thanks a lot for this awesome project.

Note: I have already added the java JDK include folder (G:\Program Files (x86)\Java\jdk1.7.0_03\include) to my project.

Crash in windows 64 bits

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000005d527473, pid=7924, tid=7436

JRE version: Java(TM) SE Runtime Environment (8.0_20-b26) (build 1.8.0_20-b26)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.20-b23 mixed mode windows-amd64 compressed oops)

Problematic frame:

V [jvm.dll+0x427473]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

An error report file with more information is saved as:

F:\workspace_new\SkinnerBox2\hs_err_pid7924.log

Compiled method (c1) 6928 244 3 java.net.URLClassLoader$1::run (5 bytes)
total in heap [0x0000000002b61710,0x0000000002b61a98] = 904
relocation [0x0000000002b61830,0x0000000002b61868] = 56
main code [0x0000000002b61880,0x0000000002b61980] = 256
stub code [0x0000000002b61980,0x0000000002b61a28] = 168
metadata [0x0000000002b61a28,0x0000000002b61a38] = 16
scopes data [0x0000000002b61a38,0x0000000002b61a50] = 24
scopes pcs [0x0000000002b61a50,0x0000000002b61a90] = 64
dependencies [0x0000000002b61a90,0x0000000002b61a98] = 8
Compiled method (c1) 6929 244 3 java.net.URLClassLoader$1::run (5 bytes)
total in heap [0x0000000002b61710,0x0000000002b61a98] = 904
relocation [0x0000000002b61830,0x0000000002b61868] = 56
main code [0x0000000002b61880,0x0000000002b61980] = 256
stub code [0x0000000002b61980,0x0000000002b61a28] = 168
metadata [0x0000000002b61a28,0x0000000002b61a38] = 16
scopes data [0x0000000002b61a38,0x0000000002b61a50] = 24
scopes pcs [0x0000000002b61a50,0x0000000002b61a90] = 64
dependencies [0x0000000002b61a90,0x0000000002b61a98] = 8

If you would like to submit a bug report, please visit:

http://bugreport.sun.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000005d777473, pid=8720, tid=6440

JRE version: Java(TM) SE Runtime Environment (8.0_20-b26) (build 1.8.0_20-b26)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.20-b23 mixed mode windows-amd64 compressed oops)

Problematic frame:

V [jvm.dll+0x427473]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

If you would like to submit a bug report, please visit:

http://bugreport.sun.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

--------------- T H R E A D ---------------

Current thread (0x0000000059ecb000): JavaThread "JNativeHook Native Dispatch" [_thread_in_native, id=6440, stack(0x0000000069b80000,0x0000000069c80000)]

siginfo: ExceptionCode=0xc0000005, reading address 0xfffffffffffffff8

Registers:
RAX=0x0000000000000000, RBX=0x0000000059ecb000, RCX=0x0000000000000000, RDX=0x0000000059ecb000
RSP=0x0000000069c7cb60, RBP=0x0000000069c7cc60, RSI=0x0000000000000005, RDI=0x00000000d67a7c78
R8 =0x0000000000000000, R9 =0x00000000029f0550, R10=0x00000000029f074c, R11=0x00000000d67a7c78
R12=0x0000000000000000, R13=0x00000000029f0e2c, R14=0x00000000d67a7c78, R15=0x0000000058e6f000
RIP=0x000000005d777473, EFLAGS=0x0000000000010246

Top of Stack: (sp=0x0000000069c7cb60)
0x0000000069c7cb60: 0000000000000000 0000000000000000
0x0000000069c7cb70: 0000000000000000 0000000000000000
0x0000000069c7cb80: 0000000000000000 0000000000000000
0x0000000069c7cb90: 0000000000000000 0000000000000000
0x0000000069c7cba0: 0000000000000000 0000000000000000
0x0000000069c7cbb0: 0000000000000000 0000000000000000
0x0000000069c7cbc0: 0000000000000000 0000000000000000
0x0000000069c7cbd0: 0000000000000000 0000000000000000
0x0000000069c7cbe0: 0000000000000000 0000000000000000
0x0000000069c7cbf0: 0000000000000000 0000000000000000
0x0000000069c7cc00: 0000000000000000 0000000000000000
0x0000000069c7cc10: 0000000000000000 0000000000000000
0x0000000069c7cc20: 0000000000000000 0000000000000000
0x0000000069c7cc30: 0000000000000000 0000000000000000
0x0000000069c7cc40: 0000000000000000 0000000000000000
0x0000000069c7cc50: 0000000000000000 0000000000000000

Instructions: (pc=0x000000005d777473)
0x000000005d777453: 40 eb 21 48 8b 83 d8 01 00 00 48 8b 8b c8 01 00
0x000000005d777463: 00 48 89 4c 24 20 48 89 4c 24 48 48 89 44 24 40
0x000000005d777473: 48 8b 49 f8 48 89 4c 24 28 e8 5f ae c5 ff 48 8d
0x000000005d777483: 4c 24 20 48 89 44 24 30 e8 30 83 e9 ff 48 8d 4c

Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x0000000059ecb000 is a thread
RCX=0x0000000000000000 is an unknown value
RDX=0x0000000059ecb000 is a thread
RSP=0x0000000069c7cb60 is pointing into the stack for thread: 0x0000000059ecb000
RBP=0x0000000069c7cc60 is pointing into the stack for thread: 0x0000000059ecb000
RSI=0x0000000000000005 is an unknown value
RDI=0x00000000d67a7c78 is an oop
java.lang.ClassNotFoundException

  • klass: 'java/lang/ClassNotFoundException'
    R8 =0x0000000000000000 is an unknown value
    R9 =0x00000000029f0550 is at entry_point+-368 in (nmethod_)0x00000000029f0550
    R10=0x00000000029f074c is at entry_point+140 in (nmethod_)0x00000000029f0550
    R11=0x00000000d67a7c78 is an oop
    java.lang.ClassNotFoundException
  • klass: 'java/lang/ClassNotFoundException'
    R12=0x0000000000000000 is an unknown value
    R13=0x00000000029f0e2c is at entry_point+844 in (nmethod*)0x00000000029f0910
    R14=0x00000000d67a7c78 is an oop
    java.lang.ClassNotFoundException
  • klass: 'java/lang/ClassNotFoundException'
    R15=0x0000000058e6f000 is a thread

Stack: [0x0000000069b80000,0x0000000069c80000], sp=0x0000000069c7cb60, free space=1010k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x427473]
V [jvm.dll+0x427a57]
C 0x000000000295b765

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
=>0x0000000059ecb000 JavaThread "JNativeHook Native Dispatch" [_thread_in_native, id=6440, stack(0x0000000069b80000,0x0000000069c80000)]
0x0000000059eca800 JavaThread "pool-51-thread-3" [_thread_blocked, id=8252, stack(0x0000000069620000,0x0000000069720000)]
0x0000000059ec9800 JavaThread "pool-51-thread-2" [_thread_blocked, id=1320, stack(0x0000000069a70000,0x0000000069b70000)]
0x0000000059ec9000 JavaThread "pool-51-thread-1" [_thread_in_native, id=8204, stack(0x00000000693d0000,0x00000000694d0000)]
0x0000000059ec8000 JavaThread "pool-49-thread-5" [_thread_blocked, id=5888, stack(0x00000000694d0000,0x00000000695d0000)]
0x0000000059ec7800 JavaThread "pool-49-thread-4" [_thread_blocked, id=7400, stack(0x00000000690b0000,0x00000000691b0000)]
0x0000000059ebc000 JavaThread "pool-49-thread-3" [_thread_blocked, id=8304, stack(0x0000000069210000,0x0000000069310000)]
0x0000000059ebb800 JavaThread "pool-49-thread-2" [_thread_blocked, id=6660, stack(0x00000000689b0000,0x0000000068ab0000)]
0x0000000059eba800 JavaThread "pool-49-thread-1" [_thread_in_native, id=7832, stack(0x0000000068f50000,0x0000000069050000)]
0x0000000059eba000 JavaThread "pool-47-thread-5" [_thread_blocked, id=7820, stack(0x0000000068e30000,0x0000000068f30000)]
0x0000000059eb9000 JavaThread "pool-47-thread-4" [_thread_blocked, id=8712, stack(0x0000000068d10000,0x0000000068e10000)]
0x0000000059eb8800 JavaThread "pool-11-thread-7" [_thread_blocked, id=8180, stack(0x0000000068bc0000,0x0000000068cc0000)]
0x0000000059eb7800 JavaThread "pool-47-thread-3" [_thread_blocked, id=8200, stack(0x00000000685e0000,0x00000000686e0000)]
0x0000000059eb7000 JavaThread "pool-47-thread-2" [_thread_blocked, id=7744, stack(0x0000000068ab0000,0x0000000068bb0000)]
0x0000000059eb6000 JavaThread "pool-47-thread-1" [_thread_in_native, id=8596, stack(0x0000000064d60000,0x0000000064e60000)]
0x0000000059eb5800 JavaThread "pool-43-thread-5" [_thread_blocked, id=9212, stack(0x00000000688b0000,0x00000000689b0000)]
0x0000000058e3f000 JavaThread "pool-43-thread-4" [_thread_blocked, id=9116, stack(0x0000000068770000,0x0000000068870000)]
0x0000000058e3e000 JavaThread "pool-45-thread-5" [_thread_blocked, id=5640, stack(0x00000000684e0000,0x00000000685e0000)]
0x0000000058e3d800 JavaThread "pool-45-thread-4" [_thread_blocked, id=6488, stack(0x0000000067bd0000,0x0000000067cd0000)]
0x0000000058e3c800 JavaThread "pool-45-thread-3" [_thread_blocked, id=8416, stack(0x0000000068370000,0x0000000068470000)]
0x0000000058e3c000 JavaThread "pool-45-thread-2" [_thread_blocked, id=3960, stack(0x0000000068200000,0x0000000068300000)]
0x0000000058e3b000 JavaThread "pool-45-thread-1" [_thread_in_native, id=4764, stack(0x00000000680e0000,0x00000000681e0000)]
0x0000000058e3a800 JavaThread "pool-11-thread-6" [_thread_blocked, id=7204, stack(0x0000000067fc0000,0x00000000680c0000)]
0x0000000058e39800 JavaThread "pool-43-thread-3" [_thread_blocked, id=4932, stack(0x00000000674f0000,0x00000000675f0000)]
0x0000000058e39000 JavaThread "pool-43-thread-2" [_thread_blocked, id=5392, stack(0x0000000067e40000,0x0000000067f40000)]
0x0000000058e38000 JavaThread "pool-43-thread-1" [_thread_in_native, id=8404, stack(0x0000000067cd0000,0x0000000067dd0000)]
0x0000000059fba000 JavaThread "pool-9-thread-5" [_thread_blocked, id=6752, stack(0x0000000067ac0000,0x0000000067bc0000)]
0x0000000059fb9800 JavaThread "pool-41-thread-3" [_thread_blocked, id=4476, stack(0x0000000064f80000,0x0000000065080000)]
0x0000000059fb8800 JavaThread "pool-41-thread-2" [_thread_blocked, id=6196, stack(0x0000000067980000,0x0000000067a80000)]
0x0000000059fb7800 JavaThread "pool-41-thread-1" [_thread_in_native, id=5372, stack(0x00000000677a0000,0x00000000678a0000)]
0x0000000059fb7000 JavaThread "pool-39-thread-5" [_thread_blocked, id=2376, stack(0x0000000066ea0000,0x0000000066fa0000)]
0x0000000059fb6000 JavaThread "pool-39-thread-4" [_thread_blocked, id=6432, stack(0x00000000675f0000,0x00000000676f0000)]
0x0000000059fb5800 JavaThread "pool-39-thread-3" [_thread_blocked, id=9152, stack(0x0000000067140000,0x0000000067240000)]
0x0000000059fb4800 JavaThread "pool-39-thread-2" [_thread_blocked, id=2116, stack(0x0000000066fc0000,0x00000000670c0000)]
0x0000000059fb4000 JavaThread "pool-39-thread-1" [_thread_in_native, id=6360, stack(0x00000000643d0000,0x00000000644d0000)]
0x0000000059fb3000 JavaThread "pool-37-thread-5" [_thread_blocked, id=8964, stack(0x0000000066d70000,0x0000000066e70000)]
0x0000000059fc6000 JavaThread "pool-37-thread-4" [_thread_blocked, id=3908, stack(0x0000000066b90000,0x0000000066c90000)]
0x0000000059fc5800 JavaThread "pool-1-thread-7" [_thread_blocked, id=6856, stack(0x0000000063f90000,0x0000000064090000)]
0x0000000059fc4800 JavaThread "pool-37-thread-3" [_thread_blocked, id=9000, stack(0x000000005c2e0000,0x000000005c3e0000)]
0x0000000059fc4000 JavaThread "pool-37-thread-2" [_thread_blocked, id=8948, stack(0x0000000063de0000,0x0000000063ee0000)]
0x0000000059fc3000 JavaThread "pool-37-thread-1" [_thread_in_native, id=5988, stack(0x0000000065ac0000,0x0000000065bc0000)]
0x0000000059fc2800 JavaThread "pool-35-thread-5" [_thread_blocked, id=5188, stack(0x00000000669e0000,0x0000000066ae0000)]
0x0000000059fc1800 JavaThread "pool-35-thread-4" [_thread_blocked, id=9120, stack(0x0000000060f80000,0x0000000061080000)]
0x0000000059fc1000 JavaThread "pool-5-thread-5" [_thread_blocked, id=6616, stack(0x0000000066860000,0x0000000066960000)]
0x0000000059fc0000 JavaThread "pool-35-thread-3" [_thread_blocked, id=9144, stack(0x0000000066760000,0x0000000066860000)]
0x0000000059fbf800 JavaThread "pool-35-thread-2" [_thread_blocked, id=6220, stack(0x00000000665e0000,0x00000000666e0000)]
0x0000000058ffd000 JavaThread "pool-35-thread-1" [_thread_in_native, id=1428, stack(0x00000000663e0000,0x00000000664e0000)]
0x0000000058ffc800 JavaThread "pool-33-thread-5" [_thread_blocked, id=6020, stack(0x0000000066240000,0x0000000066340000)]
0x0000000058ffb800 JavaThread "pool-33-thread-4" [_thread_blocked, id=7924, stack(0x00000000660a0000,0x00000000661a0000)]
0x0000000058ffb000 JavaThread "pool-33-thread-3" [_thread_blocked, id=9096, stack(0x0000000065f20000,0x0000000066020000)]
0x0000000058ffa000 JavaThread "pool-33-thread-2" [_thread_blocked, id=7332, stack(0x0000000065d60000,0x0000000065e60000)]
0x0000000058ff9000 JavaThread "pool-33-thread-1" [_thread_in_native, id=6764, stack(0x0000000065bc0000,0x0000000065cc0000)]
0x0000000058ff8800 JavaThread "pool-31-thread-5" [_thread_blocked, id=8168, stack(0x0000000065970000,0x0000000065a70000)]
0x0000000058ff7800 JavaThread "pool-31-thread-4" [_thread_blocked, id=9160, stack(0x0000000065780000,0x0000000065880000)]
0x0000000058ff7000 JavaThread "pool-1-thread-6" [_thread_blocked, id=6700, stack(0x00000000655c0000,0x00000000656c0000)]
0x0000000058ff6000 JavaThread "pool-31-thread-3" [_thread_blocked, id=6704, stack(0x00000000653d0000,0x00000000654d0000)]
0x0000000058d67800 JavaThread "pool-31-thread-2" [_thread_blocked, id=6260, stack(0x0000000065230000,0x0000000065330000)]
0x0000000058d66800 JavaThread "pool-31-thread-1" [_thread_in_native, id=4212, stack(0x0000000062bf0000,0x0000000062cf0000)]
0x0000000058d66000 JavaThread "pool-17-thread-5" [_thread_blocked, id=7180, stack(0x0000000065080000,0x0000000065180000)]
0x0000000058d65000 JavaThread "pool-17-thread-4" [_thread_blocked, id=8680, stack(0x00000000630b0000,0x00000000631b0000)]
0x0000000058d64800 JavaThread "pool-27-thread-5" [_thread_blocked, id=6972, stack(0x0000000064e80000,0x0000000064f80000)]
0x0000000058d63800 JavaThread "pool-27-thread-4" [_thread_blocked, id=7788, stack(0x0000000064c60000,0x0000000064d60000)]
0x0000000058d63000 JavaThread "pool-29-thread-5" [_thread_blocked, id=8972, stack(0x0000000064ad0000,0x0000000064bd0000)]
0x0000000058d62000 JavaThread "pool-29-thread-4" [_thread_blocked, id=6272, stack(0x0000000064920000,0x0000000064a20000)]
0x0000000058d61800 JavaThread "pool-3-thread-7" [_thread_blocked, id=3140, stack(0x0000000063b30000,0x0000000063c30000)]
0x0000000058d60800 JavaThread "pool-29-thread-3" [_thread_blocked, id=7476, stack(0x0000000064750000,0x0000000064850000)]
0x0000000058e71800 JavaThread "pool-29-thread-2" [_thread_blocked, id=7152, stack(0x0000000064650000,0x0000000064750000)]
0x0000000058e70800 JavaThread "pool-29-thread-1" [_thread_in_native, id=8748, stack(0x00000000631d0000,0x00000000632d0000)]
0x0000000058e6f000 JavaThread "JNativeHook Native Dispatch" [_thread_in_Java, id=2696, stack(0x00000000631a0000,0x00000000632a0000)]
0x0000000058e70000 JavaThread "JNativeHook Native Dispatch" daemon [_thread_blocked, id=6736, stack(0x0000000063c30000,0x0000000063d30000)]
0x0000000058e6e800 JavaThread "pool-1-thread-5" [_thread_blocked, id=5592, stack(0x0000000062f90000,0x0000000063090000)]
0x0000000058e6d800 JavaThread "pool-27-thread-3" [_thread_blocked, id=1740, stack(0x0000000061880000,0x0000000061980000)]
0x0000000058e6d000 JavaThread "pool-27-thread-2" [_thread_blocked, id=9012, stack(0x0000000062e50000,0x0000000062f50000)]
0x0000000058e6c000 JavaThread "pool-27-thread-1" [_thread_in_native, id=8960, stack(0x0000000062780000,0x0000000062880000)]
0x0000000058e6b800 JavaThread "pool-25-thread-5" [_thread_blocked, id=3136, stack(0x0000000062d10000,0x0000000062e10000)]
0x0000000058e6a800 JavaThread "pool-25-thread-4" [_thread_blocked, id=7836, stack(0x00000000629d0000,0x0000000062ad0000)]
0x0000000058cd6000 JavaThread "pool-3-thread-6" [_thread_blocked, id=6428, stack(0x0000000062af0000,0x0000000062bf0000)]
0x0000000058cd5000 JavaThread "pool-25-thread-3" [_thread_blocked, id=6548, stack(0x00000000628b0000,0x00000000629b0000)]
0x0000000058cd4800 JavaThread "pool-25-thread-2" [_thread_blocked, id=3632, stack(0x0000000062680000,0x0000000062780000)]
0x0000000058cd3800 JavaThread "pool-25-thread-1" [_thread_in_native, id=7096, stack(0x0000000061ec0000,0x0000000061fc0000)]
0x0000000058cd3000 JavaThread "pool-23-thread-5" [_thread_blocked, id=7580, stack(0x0000000062530000,0x0000000062630000)]
0x0000000058cd2000 JavaThread "pool-23-thread-4" [_thread_blocked, id=796, stack(0x00000000623c0000,0x00000000624c0000)]
0x0000000058cd1800 JavaThread "pool-11-thread-5" [_thread_blocked, id=8640, stack(0x0000000062270000,0x0000000062370000)]
0x0000000058cd0800 JavaThread "pool-23-thread-3" [_thread_blocked, id=6776, stack(0x0000000062140000,0x0000000062240000)]
0x0000000058cd0000 JavaThread "pool-23-thread-2" [_thread_blocked, id=7444, stack(0x0000000061fd0000,0x00000000620d0000)]
0x0000000058ccf000 JavaThread "pool-23-thread-1" [_thread_in_native, id=7440, stack(0x0000000061d90000,0x0000000061e90000)]
0x0000000059f7c800 JavaThread "pool-19-thread-5" [_thread_blocked, id=5096, stack(0x0000000061c60000,0x0000000061d60000)]
0x0000000059f7c000 JavaThread "pool-19-thread-4" [_thread_blocked, id=1596, stack(0x00000000614f0000,0x00000000615f0000)]
0x0000000059f7b000 JavaThread "pool-21-thread-5" [_thread_blocked, id=4060, stack(0x0000000061b30000,0x0000000061c30000)]
0x0000000059f7a800 JavaThread "pool-21-thread-4" [_thread_blocked, id=5252, stack(0x00000000619a0000,0x0000000061aa0000)]
0x0000000059f79800 JavaThread "pool-3-thread-5" [_thread_blocked, id=7296, stack(0x000000005f080000,0x000000005f180000)]
0x0000000059f79000 JavaThread "pool-21-thread-3" [_thread_blocked, id=8264, stack(0x0000000061780000,0x0000000061880000)]
0x0000000059f78000 JavaThread "pool-21-thread-2" [_thread_blocked, id=6148, stack(0x0000000061620000,0x0000000061720000)]
0x0000000059f77800 JavaThread "pool-21-thread-1" [_thread_in_native, id=8940, stack(0x0000000061390000,0x0000000061490000)]
0x0000000059f76800 JavaThread "pool-11-thread-4" [_thread_blocked, id=4232, stack(0x0000000061270000,0x0000000061370000)]
0x0000000059f76000 JavaThread "pool-19-thread-3" [_thread_blocked, id=8832, stack(0x0000000060c00000,0x0000000060d00000)]
0x0000000059bf8800 JavaThread "pool-19-thread-2" [_thread_blocked, id=8456, stack(0x0000000061080000,0x0000000061180000)]
0x0000000059bf7800 JavaThread "pool-19-thread-1" [_thread_in_native, id=7640, stack(0x0000000060e80000,0x0000000060f80000)]
0x0000000059bf7000 JavaThread "pool-9-thread-4" [_thread_blocked, id=1244, stack(0x0000000060d40000,0x0000000060e40000)]
0x0000000059bf6000 JavaThread "pool-17-thread-3" [_thread_blocked, id=6812, stack(0x0000000060ac0000,0x0000000060bc0000)]
0x0000000059bf5800 JavaThread "pool-17-thread-2" [_thread_blocked, id=7452, stack(0x00000000606d0000,0x00000000607d0000)]
0x0000000059bf4800 JavaThread "pool-17-thread-1" [_thread_in_native, id=1984, stack(0x0000000060910000,0x0000000060a10000)]
0x0000000059bf4000 JavaThread "pool-15-thread-5" [_thread_blocked, id=6284, stack(0x0000000060800000,0x0000000060900000)]
0x0000000059bf3000 JavaThread "pool-15-thread-4" [_thread_blocked, id=7800, stack(0x000000005cd00000,0x000000005ce00000)]
0x0000000059bf2800 JavaThread "pool-3-thread-4" [_thread_blocked, id=8076, stack(0x00000000604b0000,0x00000000605b0000)]
0x0000000059bf1800 JavaThread "pool-15-thread-3" [_thread_blocked, id=6244, stack(0x0000000060050000,0x0000000060150000)]
0x0000000059b00800 JavaThread "pool-15-thread-2" [_thread_blocked, id=8212, stack(0x000000005cea0000,0x000000005cfa0000)]
0x0000000059aff800 JavaThread "pool-15-thread-1" [_thread_in_native, id=6464, stack(0x000000005ca20000,0x000000005cb20000)]
0x0000000059aff000 JavaThread "pool-13-thread-5" [_thread_blocked, id=7772, stack(0x000000005cbf0000,0x000000005ccf0000)]
0x0000000059afe000 JavaThread "pool-13-thread-4" [_thread_blocked, id=6172, stack(0x000000005c920000,0x000000005ca20000)]
0x0000000059afd800 JavaThread "TimerQueue" daemon [_thread_blocked, id=9068, stack(0x000000005f930000,0x000000005fa30000)]
0x0000000059afc800 JavaThread "pool-1-thread-4" [_thread_blocked, id=7940, stack(0x000000005f1a0000,0x000000005f2a0000)]
0x0000000059afc000 JavaThread "pool-13-thread-3" [_thread_blocked, id=7636, stack(0x000000005ef70000,0x000000005f070000)]
0x0000000059afb000 JavaThread "pool-13-thread-2" [_thread_blocked, id=5068, stack(0x000000005eb80000,0x000000005ec80000)]
0x0000000059afa800 JavaThread "pool-13-thread-1" [_thread_in_native, id=8360, stack(0x000000005ea10000,0x000000005eb10000)]
0x0000000059af9800 JavaThread "pool-7-thread-5" [_thread_blocked, id=1144, stack(0x000000005e820000,0x000000005e920000)]
0x0000000059af9000 JavaThread "pool-7-thread-4" [_thread_blocked, id=6328, stack(0x000000005e6a0000,0x000000005e7a0000)]
0x0000000059af8000 JavaThread "pool-5-thread-4" [_thread_blocked, id=6348, stack(0x000000005e560000,0x000000005e660000)]
0x0000000059af7800 JavaThread "DestroyJavaVM" [_thread_blocked, id=8548, stack(0x0000000002490000,0x0000000002590000)]
0x0000000059af6800 JavaThread "Thread-6" [_thread_blocked, id=3848, stack(0x000000005dd90000,0x000000005de90000)]
0x0000000059af6000 JavaThread "pool-11-thread-3" [_thread_blocked, id=4420, stack(0x000000005e460000,0x000000005e560000)]
0x0000000059af5000 JavaThread "pool-11-thread-2" [_thread_blocked, id=8008, stack(0x000000005e260000,0x000000005e360000)]
0x0000000059af4800 JavaThread "pool-11-thread-1" [_thread_in_native, id=9100, stack(0x000000005d060000,0x000000005d160000)]
0x0000000059af3800 JavaThread "Thread-5" [_thread_blocked, id=7244, stack(0x000000005e100000,0x000000005e200000)]
0x0000000059af3000 JavaThread "pool-9-thread-3" [_thread_blocked, id=9156, stack(0x000000005e000000,0x000000005e100000)]
0x0000000059af2000 JavaThread "pool-7-thread-3" [_thread_blocked, id=3612, stack(0x000000005df00000,0x000000005e000000)]
0x0000000059af1800 JavaThread "pool-9-thread-2" [_thread_blocked, id=6888, stack(0x000000005d160000,0x000000005d260000)]
0x0000000058d32000 JavaThread "pool-7-thread-2" [_thread_blocked, id=5344, stack(0x000000005c4f0000,0x000000005c5f0000)]
0x0000000058d31000 JavaThread "pool-9-thread-1" [_thread_in_native, id=8756, stack(0x000000005c750000,0x000000005c850000)]
0x0000000058d30800 JavaThread "pool-7-thread-1" [_thread_in_native, id=5932, stack(0x000000005c5f0000,0x000000005c6f0000)]
0x0000000058d2f800 JavaThread "Thread-4" [_thread_blocked, id=8516, stack(0x000000005c3e0000,0x000000005c4e0000)]
0x0000000058d2f000 JavaThread "Thread-3" [_thread_blocked, id=8316, stack(0x000000005c1e0000,0x000000005c2e0000)]
0x0000000058d2e000 JavaThread "pool-5-thread-3" [_thread_blocked, id=5472, stack(0x000000005bfd0000,0x000000005c0d0000)]
0x0000000058d2d800 JavaThread "pool-5-thread-2" [_thread_blocked, id=2932, stack(0x000000005b9b0000,0x000000005bab0000)]
0x0000000058d2c800 JavaThread "pool-5-thread-1" [_thread_in_native, id=6064, stack(0x000000005be50000,0x000000005bf50000)]
0x0000000058d2c000 JavaThread "Thread-1" [_thread_blocked, id=3336, stack(0x000000005bc80000,0x000000005bd80000)]
0x0000000058d2b000 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=6588, stack(0x000000005bb10000,0x000000005bc10000)]
0x0000000059ae6000 JavaThread "AWT-Windows" daemon [_thread_in_native, id=9072, stack(0x000000005af60000,0x000000005b060000)]
0x0000000059ae5000 JavaThread "AWT-Shutdown" [_thread_blocked, id=4236, stack(0x000000005b6d0000,0x000000005b7d0000)]
0x0000000059ae4000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=6664, stack(0x000000005b590000,0x000000005b690000)]
0x0000000059a7b000 JavaThread "pool-3-thread-3" [_thread_blocked, id=4608, stack(0x000000005b3b0000,0x000000005b4b0000)]
0x0000000058f2b800 JavaThread "pool-3-thread-2" [_thread_blocked, id=2000, stack(0x000000005b290000,0x000000005b390000)]
0x0000000058f2a800 JavaThread "pool-3-thread-1" [_thread_in_native, id=5644, stack(0x000000005b080000,0x000000005b180000)]
0x0000000058f2a000 JavaThread "Thread-0" [_thread_in_native, id=5464, stack(0x000000005ae40000,0x000000005af40000)]
0x0000000058f39800 JavaThread "pool-1-thread-3" [_thread_blocked, id=3504, stack(0x000000005a4b0000,0x000000005a5b0000)]
0x0000000059a47000 JavaThread "pool-1-thread-2" [_thread_blocked, id=7808, stack(0x000000005a2e0000,0x000000005a3e0000)]
0x0000000058e26800 JavaThread "pool-1-thread-1" [_thread_in_native, id=2664, stack(0x00000000598f0000,0x00000000599f0000)]
0x0000000058cfd800 JavaThread "Service Thread" daemon [_thread_blocked, id=6460, stack(0x0000000059360000,0x0000000059460000)]
0x0000000058c94800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=5680, stack(0x0000000058a80000,0x0000000058b80000)]
0x000000005736d000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=8560, stack(0x00000000591c0000,0x00000000592c0000)]
0x0000000057364000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=8248, stack(0x0000000058b90000,0x0000000058c90000)]
0x0000000057362800 JavaThread "Attach Listener" daemon [_thread_blocked, id=4480, stack(0x0000000058930000,0x0000000058a30000)]
0x0000000057361000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6524, stack(0x00000000587f0000,0x00000000588f0000)]
0x00000000572fc800 JavaThread "Finalizer" daemon [_thread_blocked, id=4656, stack(0x0000000058500000,0x0000000058600000)]
0x00000000572f9800 JavaThread "Reference Handler" daemon [_thread_blocked, id=2176, stack(0x0000000058690000,0x0000000058790000)]

Other Threads:
0x00000000572f5800 VMThread [stack: 0x00000000583f0000,0x00000000584f0000] [id=9016]
0x0000000058cff000 WatcherThread [stack: 0x00000000595b0000,0x00000000596b0000] [id=7948]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap:
PSYoungGen total 38400K, used 26514K [0x00000000d5d00000, 0x00000000d8780000, 0x0000000100000000)
eden space 33280K, 71% used [0x00000000d5d00000,0x00000000d7424338,0x00000000d7d80000)
from space 5120K, 55% used [0x00000000d7d80000,0x00000000d80406a8,0x00000000d8280000)
to space 5120K, 0% used [0x00000000d8280000,0x00000000d8280000,0x00000000d8780000)
ParOldGen total 87552K, used 8K [0x0000000081600000, 0x0000000086b80000, 0x00000000d5d00000)
object space 87552K, 0% used [0x0000000081600000,0x0000000081602000,0x0000000086b80000)
Metaspace used 12893K, capacity 13070K, committed 13184K, reserved 1060864K
class space used 1576K, capacity 1624K, committed 1664K, reserved 1048576K

Card table byte_map: [0x0000000011c20000,0x0000000012020000] byte_map_base: 0x0000000011815000

Marking Bits: (ParMarkBitMap*) 0x000000005db2b460
Begin Bits: [0x0000000012620000, 0x00000000145c8000)
End Bits: [0x00000000145c8000, 0x0000000016570000)

Polling page: 0x0000000000220000

CodeCache: size=245760Kb used=3750Kb max_used=3750Kb free=242009Kb
bounds [0x0000000002860000, 0x0000000002c10000, 0x0000000011860000]
total_blobs=1638 nmethods=1139 adapters=412
compilation: enabled

Compilation events (10 events):
Event: 30.812 Thread 0x0000000058c94800 1188 3 java.util.HashMap$EntryIterator:: (11 bytes)
Event: 30.812 Thread 0x0000000058c94800 nmethod 1188 0x0000000002c09390 code [0x0000000002c09500, 0x0000000002c096a8]
Event: 30.815 Thread 0x0000000058c94800 1189 3 java.io.BufferedInputStream::getInIfOpen (21 bytes)
Event: 30.815 Thread 0x0000000058c94800 nmethod 1189 0x0000000002c09750 code [0x0000000002c098c0, 0x0000000002c09ae8]
Event: 30.815 Thread 0x0000000058c94800 1190 3 sun.util.PreHashedMap::get (73 bytes)
Event: 30.815 Thread 0x0000000058c94800 nmethod 1190 0x0000000002c09b90 code [0x0000000002c09d60, 0x0000000002c0a458]
Event: 30.815 Thread 0x0000000058c94800 1191 3 java.io.BufferedInputStream::fill (233 bytes)
Event: 30.816 Thread 0x0000000058c94800 nmethod 1191 0x0000000002c0a750 code [0x0000000002c0a980, 0x0000000002c0b498]
Event: 30.816 Thread 0x0000000058c94800 1192 1 java.util.concurrent.CopyOnWriteArrayList::getArray (5 bytes)
Event: 30.816 Thread 0x0000000058c94800 nmethod 1192 0x0000000002c05b10 code [0x0000000002c05c60, 0x0000000002c05d70]

GC Heap History (2 events):
Event: 0.884 GC heap before
{Heap before GC invocations=1 (full 0):
PSYoungGen total 38400K, used 33139K [0x00000000d5d00000, 0x00000000d8780000, 0x0000000100000000)
eden space 33280K, 99% used [0x00000000d5d00000,0x00000000d7d5cf08,0x00000000d7d80000)
from space 5120K, 0% used [0x00000000d8280000,0x00000000d8280000,0x00000000d8780000)
to space 5120K, 0% used [0x00000000d7d80000,0x00000000d7d80000,0x00000000d8280000)
ParOldGen total 87552K, used 0K [0x0000000081600000, 0x0000000086b80000, 0x00000000d5d00000)
object space 87552K, 0% used [0x0000000081600000,0x0000000081600000,0x0000000086b80000)
Metaspace used 11604K, capacity 11822K, committed 12032K, reserved 1060864K
class space used 1466K, capacity 1528K, committed 1536K, reserved 1048576K
Event: 0.893 GC heap after
Heap after GC invocations=1 (full 0):
PSYoungGen total 38400K, used 2817K [0x00000000d5d00000, 0x00000000d8780000, 0x0000000100000000)
eden space 33280K, 0% used [0x00000000d5d00000,0x00000000d5d00000,0x00000000d7d80000)
from space 5120K, 55% used [0x00000000d7d80000,0x00000000d80406a8,0x00000000d8280000)
to space 5120K, 0% used [0x00000000d8280000,0x00000000d8280000,0x00000000d8780000)
ParOldGen total 87552K, used 8K [0x0000000081600000, 0x0000000086b80000, 0x00000000d5d00000)
object space 87552K, 0% used [0x0000000081600000,0x0000000081602000,0x0000000086b80000)
Metaspace used 11604K, capacity 11822K, committed 12032K, reserved 1060864K
class space used 1466K, capacity 1528K, committed 1536K, reserved 1048576K
}

Deoptimization events (2 events):
Event: 0.762 Thread 0x0000000058d2b000 Uncommon trap: reason=unreached action=reinterpret pc=0x0000000002a3c20c method=java.lang.AbstractStringBuilder.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder; @ 1
Event: 0.762 Thread 0x0000000058d2b000 Uncommon trap: reason=unreached action=reinterpret pc=0x0000000002a022e8 method=java.lang.AbstractStringBuilder.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder; @ 1

Internal exceptions (10 events):
Event: 19.112 Thread 0x0000000058f2a000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d66c5f50) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]
Event: 19.187 Thread 0x0000000058f2a000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6703b10) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]
Event: 19.189 Thread 0x0000000058f2a000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d67098d0) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]
Event: 19.191 Thread 0x0000000058f2a000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d67142c0) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]
Event: 19.192 Thread 0x0000000058f2a000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6720e18) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]
Event: 19.193 Thread 0x0000000058f2a000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6727228) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]
Event: 19.197 Thread 0x0000000058f2a000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d672b1a0) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]
Event: 19.199 Thread 0x0000000058f2a000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d672d028) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]
Event: 19.200 Thread 0x0000000058f2a000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6730910) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]
Event: 20.738 Thread 0x0000000058e6f000 Exception <a 'java/security/PrivilegedActionException'> (0x00000000d6784a08) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u20\1074\hotspot\src\share\vm\prims\jvm.cpp, line 1275]

Events (10 events):
Event: 30.806 Thread 0x0000000059ebb800 Thread added: 0x0000000059ebb800
Event: 30.808 Thread 0x0000000059ebc000 Thread added: 0x0000000059ebc000
Event: 30.809 Thread 0x0000000059ec7800 Thread added: 0x0000000059ec7800
Event: 30.809 Thread 0x0000000059ec8000 Thread added: 0x0000000059ec8000
Event: 30.810 Thread 0x0000000059ec9000 Thread added: 0x0000000059ec9000
Event: 30.813 Thread 0x0000000059ec9800 Thread added: 0x0000000059ec9800
Event: 30.815 Thread 0x0000000059eca800 Thread added: 0x0000000059eca800
Event: 30.816 Thread 0x0000000059ecb000 Thread added: 0x0000000059ecb000
Event: 30.816 loading class org/jnativehook/GlobalScreen$2
Event: 30.816 loading class org/jnativehook/GlobalScreen$2 done

Dynamic libraries:
0x000000013f4d0000 - 0x000000013f504000 C:\Program Files\Java\jre1.8.0_20\bin\javaw.exe
0x00000000770b0000 - 0x0000000077259000 C:\Windows\SYSTEM32\ntdll.dll
0x0000000076e90000 - 0x0000000076faf000 C:\Windows\system32\kernel32.dll
0x000007fefcf10000 - 0x000007fefcf7c000 C:\Windows\system32\KERNELBASE.dll
0x000007fefd360000 - 0x000007fefd43b000 C:\Windows\system32\ADVAPI32.dll
0x000007fefd970000 - 0x000007fefda0f000 C:\Windows\system32\msvcrt.dll
0x000007fefdf00000 - 0x000007fefdf1f000 C:\Windows\SYSTEM32\sechost.dll
0x000007fefd790000 - 0x000007fefd8bd000 C:\Windows\system32\RPCRT4.dll
0x0000000076fb0000 - 0x00000000770aa000 C:\Windows\system32\USER32.dll
0x000007fefef50000 - 0x000007fefefb7000 C:\Windows\system32\GDI32.dll
0x000007fefef40000 - 0x000007fefef4e000 C:\Windows\system32\LPK.dll
0x000007fefd290000 - 0x000007fefd359000 C:\Windows\system32\USP10.dll
0x000007fefb810000 - 0x000007fefba04000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\COMCTL32.dll
0x000007fefd8f0000 - 0x000007fefd961000 C:\Windows\system32\SHLWAPI.dll
0x000007fefd8c0000 - 0x000007fefd8ee000 C:\Windows\system32\IMM32.DLL
0x000007feff2b0000 - 0x000007feff3b9000 C:\Windows\system32\MSCTF.dll
0x000000005dc90000 - 0x000000005dd62000 C:\Program Files\Java\jre1.8.0_20\bin\msvcr100.dll
0x000000005d350000 - 0x000000005dba8000 C:\Program Files\Java\jre1.8.0_20\bin\server\jvm.dll
0x000007feefc70000 - 0x000007feefc79000 C:\Windows\system32\WSOCK32.dll
0x000007fefd440000 - 0x000007fefd48d000 C:\Windows\system32\WS2_32.dll
0x000007fefd280000 - 0x000007fefd288000 C:\Windows\system32\NSI.dll
0x000007fefab10000 - 0x000007fefab4b000 C:\Windows\system32\WINMM.dll
0x0000000077270000 - 0x0000000077277000 C:\Windows\system32\PSAPI.DLL
0x000000006afb0000 - 0x000000006afbf000 C:\Program Files\Java\jre1.8.0_20\bin\verify.dll
0x000000006af80000 - 0x000000006afa8000 C:\Program Files\Java\jre1.8.0_20\bin\java.dll
0x0000000060690000 - 0x00000000606a6000 C:\Program Files\Java\jre1.8.0_20\bin\zip.dll
0x000007fefe1b0000 - 0x000007fefef38000 C:\Windows\system32\SHELL32.dll
0x000007fefefc0000 - 0x000007feff1c3000 C:\Windows\system32\ole32.dll
0x000007fefcec0000 - 0x000007fefcecf000 C:\Windows\system32\profapi.dll
0x0000000060230000 - 0x000000006024a000 C:\Program Files\Java\jre1.8.0_20\bin\net.dll
0x000007fefc660000 - 0x000007fefc6b5000 C:\Windows\system32\mswsock.dll
0x000007fefc650000 - 0x000007fefc657000 C:\Windows\System32\wship6.dll
0x000007fefc080000 - 0x000007fefc087000 C:\Windows\System32\wshtcpip.dll
0x000007fefc4e0000 - 0x000007fefc53b000 C:\Windows\system32\DNSAPI.dll
0x000007fefa7d0000 - 0x000007fefa7f7000 C:\Windows\system32\IPHLPAPI.DLL
0x000007fefa7c0000 - 0x000007fefa7cb000 C:\Windows\system32\WINNSI.DLL
0x000007fef4930000 - 0x000007fef4938000 C:\Windows\system32\rasadhlp.dll
0x000007fef93e0000 - 0x000007fef9433000 C:\Windows\System32\fwpuclnt.dll
0x000007fee7660000 - 0x000007fee8031000 C:\Windows\System32\opencv_java2410.dll
0x000007fefa340000 - 0x000007fefa35f000 C:\Windows\system32\AVIFIL32.dll
0x000007fef0cb0000 - 0x000007fef0cc8000 C:\Windows\system32\MSACM32.dll
0x000007fef8ff0000 - 0x000007fef9019000 C:\Windows\system32\MSVFW32.dll
0x000007fefa360000 - 0x000007fefa377000 C:\Windows\system32\AVICAP32.dll
0x000007fefbe10000 - 0x000007fefbe1c000 C:\Windows\system32\VERSION.dll
0x000007feff1d0000 - 0x000007feff2a7000 C:\Windows\system32\OLEAUT32.dll
0x000000005b7f0000 - 0x000000005b988000 C:\Program Files\Java\jre1.8.0_20\bin\awt.dll
0x000007fefb600000 - 0x000007fefb656000 C:\Windows\system32\uxtheme.dll
0x000007fefb080000 - 0x000007fefb098000 C:\Windows\system32\dwmapi.dll
0x000007fefcd60000 - 0x000007fefcd6f000 C:\Windows\system32\CRYPTBASE.dll
0x000000005fec0000 - 0x000000005ff07000 C:\Program Files\Java\jre1.8.0_20\bin\fontmanager.dll
0x0000000060250000 - 0x0000000060261000 C:\Program Files\Java\jre1.8.0_20\bin\nio.dll
0x00000000004b0000 - 0x00000000004f1000 C:\Program Files\Java\jre1.8.0_20\bin\t2k.dll
0x000000006a800000 - 0x000000006a815000 C:\Users\tux\AppData\Local\Temp\JNativeHook-1.2.RC2.dll
0x000007fef8fd0000 - 0x000007fef8fd4000 C:\Windows\system32\KBDUS.DLL
0x000007fef8fe0000 - 0x000007fef8fe5000 C:\Windows\system32\KBDLA.DLL
0x000007fefa200000 - 0x000007fefa325000 C:\Windows\system32\dbghelp.dll

VM Arguments:
jvm_args: -Dfile.encoding=Cp1252
java_command: test.Test
java_class_path (initial): F:\workspace_new\SkinnerBox2\bin;F:\workspace_new\SkinnerBox2\lib;F:\workspace_new\SkinnerBox2\lib\rabbitmq-java-client-bin-3.3.4\rabbitmq-client.jar;F:\workspace_new\SkinnerBox2\lib\swt.jar;F:\workspace_new\SkinnerBox2\lib\commons-lang3-3.3.2.jar;F:\workspace_new\SkinnerBox2\lib\commons-math3-3.3.jar;F:\workspace_new\SkinnerBox2\lib\opencv-2410.jar;F:\workspace_new\SkinnerBox2\lib\JNativeHook.jar;F:\workspace_new\SkinnerBox2\lib\ghost4j-0.5.1.jar;F:\workspace_new\SkinnerBox2\lib\jai_imageio.jar;F:\workspace_new\SkinnerBox2\lib\jna-4.1.0.jar;F:\workspace_new\SkinnerBox2\lib\junit-4.10.jar;F:\workspace_new\SkinnerBox2\lib\log4j-1.2.17.jar;F:\workspace_new\SkinnerBox2\lib\tess4j.jar
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:/Program Files/Java/jre1.8.0_20/bin/server;C:/Program Files/Java/jre1.8.0_20/bin;C:/Program Files/Java/jre1.8.0_20/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\Common Files\Lenovo;C:\Program Files (x86)\Lenovo\Access Connections;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files\SafeNet\Authentication\SAC\x64;C:\Program Files\SafeNet\Authentication\SAC\x32;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files\eclipse;
USERNAME=tux
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel

--------------- S Y S T E M ---------------

OS: Windows 7 , 64 bit Build 7601 Service Pack 1

CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 42 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, ht, tsc, tscinvbit

Memory: 4k page, physical 8297712k(2232948k free), swap 16593560k(8431956k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.20-b23) for windows-amd64 JRE (1.8.0_20-b26), built on Jul 30 2014 13:51:23 by "java_re" with MS VC++ 10.0 (VS2010)

time: Thu Oct 30 11:35:21 2014
elapsed time: 31 seconds (0d 0h 0m 31s)

Keyboard arrow keys issues

I am using a Mac keyboard on a Windows 7 machine (also tested other keyboards) and the key codes for the arrows are different to the constant VC_... values. Below is the decimal values gotten. I haven't had the chance to test other machines but all other keys seem to be fine so i'm not sure if this is just a bug or my machine.

up - 3656
left - 3661
right - 3659
down - 3664

Add maven artifact

It would be very nice to be able to add this library as a dependency.
(Though it seems hard since there's native code and I'm not sure how maven would handle that)

Console output

Hi,
how can i supress the debug information of the library?
Every mouse move and every keystroke spams the console like this:

Jan 11, 2015 5:21:14 PM org.jnativehook.GlobalScreen$NativeHookThread enable
INFORMATION: hook_event_proc [598]: Mouse moved to 108, 497. (0)

Can i deactive this information log?

Greetings,
Van

native library JNativeHook.dll

How can I solve this ?

run:
Dec 17, 2014 9:06:40 PM org.jnativehook.GlobalScreen loadNativeLibrary
SEVERE: Unable to extract the native library /org/jnativehook/lib/windows/x86_64/JNativeHook.dll!

Exception in thread "main" java.lang.UnsatisfiedLinkError
at org.jnativehook.GlobalScreen.loadNativeLibrary(GlobalScreen.java:714)
at org.jnativehook.GlobalScreen.(GlobalScreen.java:88)
at org.jnativehook.GlobalScreen.(GlobalScreen.java:64)
at keylogger.KeyLogger.main(KeyLogger.java:35)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

JnativeHook with javafx

Hi
I am trying to use this library in a javafx application.But It can not work with javafx controls.For example when i want to set textfield or button text in NativeMoseClicked method NullPointerException Error occurred.It seems to be a bug in JNativeHook library.I post this problem in stackoverflow site and no solution found for it.you can see my post in Stackoverflow by bellow link:

stackoverflow

In your opinion, this is not a bug?
I am sorry for my poor English.

Key always returns zero

I got a problem, simply by adding NativeKeyListener. Every keys return zero :/
Here are the logs:

NATIVE_KEY_TYPED,keyCode=0,keyText=Non défini,keyChar='a',keyLocation=KEY_LOCATION_STANDARD,rawCode=97
NATIVE_KEY_TYPED,keyCode=0,keyText=Non défini,keyChar='z',keyLocation=KEY_LOCATION_STANDARD,rawCode=122
NATIVE_KEY_TYPED,keyCode=0,keyText=Non défini,keyChar='e',keyLocation=KEY_LOCATION_STANDARD,rawCode=101
NATIVE_KEY_TYPED,keyCode=0,keyText=Non défini,keyChar='r',keyLocation=KEY_LOCATION_STANDARD,rawCode=114
NATIVE_KEY_TYPED,keyCode=0,keyText=Non défini,keyChar='t',keyLocation=KEY_LOCATION_STANDARD,rawCode=116
NATIVE_KEY_TYPED,keyCode=0,keyText=Non défini,keyChar='y',keyLocation=KEY_LOCATION_STANDARD,rawCode=121

I work on Ubuntu 14.04, maybe it's related. The thing is that I didn't have this problem some minutes ago and I haven't changed anything in my code :/

Unsupported major.minor version

When trying to run my Application on a OSX 10.9 with java 1.6 installed, I get this stacktrace:

Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.UnsupportedClassVersionError: org/jnativehook/keyboard/NativeKeyListener : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 5 more

Any ideas why it crashes?

NullPointerException during accessibility check

When starting my app using JNLP when the accessibility feature is turned off I get a NullPointerException in the hook thread. I'm seeing this on OS X 10.9 and 10.10 (haven't tried on below 10.9). I see the system dialog asking for accessibility approval; and at roughly the same time I notice a NullPointerException.

This issue appeared in RC3 and is still present in RC4.

I'm not sure if this issue should be submitted here, or at libuihook. The name of the thread that dies because of the NPE is: JNativeHook Native Hook.

SIGSEGV after creating a JFrame after several system items in conjunction with v1.2.0-RC2 on Linux only

I've tried this both in openJDK as well as Hotspot (newest versions for each) this is affecting the use of my little tool on Linux (which I've just recently adopted myself) where as this issue will not show up on Windows or OSX.

FYI I was using 1.1 till today, upgraded because I seen another issue that was resolved with this patch level.

I've produced a testcase based on my own project which I ripped apart to get it down to a minimal testcase where only the contributing items are present.

http://co60.ca/sandbox/Testcase.tar.gz

Details:

Create a Field for a Toolkit.getDefaultToolkit (this is used for capturing the clipboard later in the software)
Register a NativeHook in our keyhook class
Try and open a JFrame with ("test")

Below error will appear in stdout. View the pid failure in the archive for more details.

 A fatal error has been detected by the Java Runtime Environment:

  SIGSEGV (0xb) at pc=0x00007f35ad729814, pid=8245, tid=139868524365568

JRE version: Java(TM) SE Runtime Environment (7.0_72-b14) (build 1.7.0_72-b14)
 Java VM: Java HotSpot(TM) 64-Bit Server VM (24.72-b04 mixed mode linux-amd64 compressed oops)
 Problematic frame:
 C  [libpthread.so.0+0x9814]  pthread_mutex_lock+0x4

Pre-Built?

So it was suggested to me that I use jnativehook so I came here hoping to find a .jar I could just download. Unfortunately, this is not available.

I am trying to build it but ran into problems where jnitasks is apparently required. I was fine with building it until I realised I had to build something else. No. Just no. I have no idea what I'm doing here...

Please just provide a bloody jar file so I can be done with this... Preferably one with docs.

EDIT: I just found through some long-tail Google searches. I'd suggest making an edit to the README telling people where to find them as not everyone is an expert with Github.

Event clock gets out of sync on long run

I changed line (https://github.com/kwhat/jnativehook/blob/master/src/java/org/jnativehook/example/NativeHookDemo.java#L346) from
txtEventInfo.append("\n" + e.paramString());
to
txtEventInfo.append("\n" + (System.currentTimeMillis() - e.getWhen()) + "\t" + e.paramString());
to see how fast event listeners get notified about event.

I started demo program on Mac OS X. Everything looked good at start, but after longer run I found difference between e.getWhen() and Java system time System.currentTimeMillis() started to grow. Not only grow but became negative what should not happen. After few hours run difference becomes > 1 second. Log screen is showing about immediately reaction on mouse move or key press. Screenshot bellow shows result after really long run.
screensnapz225

This strange result appeared on Mac OS X 10.10.2 on Intel i7, Mac OS X 10.9.5 on Intel i5, Virtual Windows 8.1 64-bits on Mac OS X 10.10.2 using Parallels Desktop 10 (see picture bellow), real (not virtual) Windows XP 32-bits on Pentium 4.

screensnapz226

Virtual Ubuntu 14.05 32-bits on Mac OS X 10.10.2 using Parallels Desktop 10 showed time difference immediately (see picture bellow)

screensnapz227

I do not get time difference grow on real (not virtual) Windows 7 64-bits on i5 and Windows 8.1 64-bits on i5.

I do not tested on other OS'es yet.

NativeKeyEvent.getKeyCode() mismatch

[v2.0.0-RC5]
The java event nativeKeyReleased gives the wrong key code (usually the correct one + 8). nativeKeyPressed works fine though.

I'm running Xubuntu 14.10 x64

Limit to keyboard events

Is it possible to disable listening to mouse events? I.e. if a program is only interested in keyboard events.

jvm crash

crash after register NativeKeyListener

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007fe32282b8b4, pid=14693, tid=140612151564032

JRE version: OpenJDK Runtime Environment (7.0_65-b32) (build 1.7.0_65-b32)

Java VM: OpenJDK 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)

Problematic frame:

C [libpthread.so.0+0x98b4] pthread_mutex_lock+0x4

Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

If you would like to submit a bug report, please include

instructions on how to reproduce the bug and visit:

http://icedtea.classpath.org/bugzilla

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

--------------- T H R E A D ---------------

Current thread (0x00007fe2d4104800): JavaThread "Timer-1" [_thread_in_native, id=14725, stack(0x00007fe2d1485000,0x00007fe2d1586000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000001ba8736

Registers:
RAX=0x00007fe2decf4210, RBX=0x00007fe2d4058810, RCX=0x000000000000023c, RDX=0x00007fe2d1583bb0
RSP=0x00007fe2d1583b30, RBP=0x00007fe2d1583bc0, RSI=0x00007fe2d1583ba0, RDI=0x0000000001ba8726
R8 =0x00007fe2d1583bc0, R9 =0x0000000000000000, R10=0x0000000000000065, R11=0x0000000000000004
R12=0x00007fe2d1583b9c, R13=0x00007fe2d1583cd0, R14=0x00007fe2e80eca20, R15=0x00007fe2d402acc0
RIP=0x00007fe32282b8b4, EFLAGS=0x0000000000010206, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007fe2d1583b30)
0x00007fe2d1583b30: 000000000000023c 00007fe2ded0e85a
0x00007fe2d1583b40: 00007fe2d1583ba0 00007fe2d1583bb0
0x00007fe2d1583b50: 00007fe2e80eca20 00007fe2d402acc0
0x00007fe2d1583b60: 00007fe2e81283d0 3e50bab9559a6300
0x00007fe2d1583b70: 00007fe2d402acc0 00007fe2e81283d0
0x00007fe2d1583b80: 00007fe2e80eca20 00007fe2deceac96
0x00007fe2d1583b90: 00007fe2d41049d8 00007fe2d1583c40
0x00007fe2d1583ba0: 000002360000023c 00007fe300000000
0x00007fe2d1583bb0: 0000018300000182 00007fe200000000
0x00007fe2d1583bc0: 00007fe2e80eca20 00007fe2e81283d0
0x00007fe2d1583bd0: 00007fe2d402acc0 3e50bab9559a6300
0x00007fe2d1583be0: 00007fe2d41049d8 00007fe2d1583c40
0x00007fe2d1583bf0: 00007fe2d1583cd8 00007fe2df2768f9
0x00007fe2d1583c00: 000000b800000001 00007fe2e81283d0
0x00007fe2d1583c10: 000000077fa01580 000000077fa01580
0x00007fe2d1583c20: 0000000000000000 000000077fa01580
0x00007fe2d1583c30: 00007fe2d1583ce8 00007fe2d4104800
0x00007fe2d1583c40: 00007fe2d1583cb0 00007fe318bfe7f8
0x00007fe2d1583c50: 00007fe2f02bec78 00007fe2f02bec78
0x00007fe2d1583c60: 00007fe2fffffffe 0000000000000000
0x00007fe2d1583c70: 00007fe2d1583c70 000000077fa01580
0x00007fe2d1583c80: 00007fe2d1583ce8 000000077fa05f88
0x00007fe2d1583c90: 0000000000000000 000000077fa01580
0x00007fe2d1583ca0: 0000000000000000 00007fe2d1583cd0
0x00007fe2d1583cb0: 00007fe2d1583d30 00007fe318bf2233
0x00007fe2d1583cc0: 00000007d8f218f8 00007fe318bfacdb
0x00007fe2d1583cd0: 00000007d9a7da10 00000007da4de748
0x00007fe2d1583ce0: 00007fe2d402acc0 00007fe318bf2175
0x00007fe2d1583cf0: 00007fe2d1583cf0 000000077f9ceb2c
0x00007fe2d1583d00: 00007fe2d1583d48 000000077f9ea3c0
0x00007fe2d1583d10: 0000000000000000 000000077f9cebf8
0x00007fe2d1583d20: 00007fe2d1583cd0 00007fe2d1583d50

Instructions: (pc=0x00007fe32282b8b4)
0x00007fe32282b894: 64 48 c7 04 25 f0 02 00 00 00 00 00 00 b8 82 00
0x00007fe32282b8a4: 00 00 e9 1a fa ff ff 0f 1f 44 00 00 48 83 ec 08
0x00007fe32282b8b4: 8b 57 10 89 d1 89 d0 81 e1 7f 01 00 00 83 e0 7c
0x00007fe32282b8c4: 75 7a 85 c9 49 89 f8 0f 85 7f 00 00 00 8b 0d ad

Register to memory mapping:

RAX=0x00007fe2decf4210: <offset 0x30210> in /usr/lib/libX11.so.6 at 0x00007fe2decc4000
RBX=0x00007fe2d4058810 is an unknown value
RCX=0x000000000000023c is an unknown value
RDX=0x00007fe2d1583bb0 is pointing into the stack for thread: 0x00007fe2d4104800
RSP=0x00007fe2d1583b30 is pointing into the stack for thread: 0x00007fe2d4104800
RBP=0x00007fe2d1583bc0 is pointing into the stack for thread: 0x00007fe2d4104800
RSI=0x00007fe2d1583ba0 is pointing into the stack for thread: 0x00007fe2d4104800
RDI=0x0000000001ba8726 is an unknown value
R8 =0x00007fe2d1583bc0 is pointing into the stack for thread: 0x00007fe2d4104800
R9 =0x0000000000000000 is an unknown value
R10=0x0000000000000065 is an unknown value
R11=0x0000000000000004 is an unknown value
R12=0x00007fe2d1583b9c is pointing into the stack for thread: 0x00007fe2d4104800
R13=0x00007fe2d1583cd0 is pointing into the stack for thread: 0x00007fe2d4104800
R14=0x00007fe2e80eca20 is an unknown value
R15=0x00007fe2d402acc0 is an unknown value

Stack: [0x00007fe2d1485000,0x00007fe2d1586000], sp=0x00007fe2d1583b30, free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libpthread.so.0+0x98b4] pthread_mutex_lock+0x4

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.awt.X11.XlibWrapper.XGetDefault(JLjava/lang/String;Ljava/lang/String;)Ljava/lang/String;+0
j sun.awt.X11.XToolkit.initializeMultiClickTime()V+12
j sun.awt.X11.XToolkit.getMultiClickTime()I+6
j sun.awt.X11.XToolkit.initializeDesktopProperties()V+82
j java.awt.Toolkit.getDesktopProperty(Ljava/lang/String;)Ljava/lang/Object;+32
j sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(Z)Lsun/swing/SwingUtilities2$AATextInfo;+11
j javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(Ljavax/swing/UIDefaults;)V+12100
j javax.swing.plaf.basic.BasicLookAndFeel.getDefaults()Ljavax/swing/UIDefaults;+25
j javax.swing.plaf.metal.MetalLookAndFeel.getDefaults()Ljavax/swing/UIDefaults;+9
j javax.swing.UIManager.setLookAndFeel(Ljavax/swing/LookAndFeel;)V+79
j javax.swing.UIManager.setLookAndFeel(Ljava/lang/String;)V+16
j javax.swing.UIManager.initializeDefaultLAF(Ljava/util/Properties;)V+55
j javax.swing.UIManager.initialize()V+9
j javax.swing.UIManager.maybeInitialize()V+22
j javax.swing.UIManager.getUI(Ljavax/swing/JComponent;)Ljavax/swing/plaf/ComponentUI;+0
j javax.swing.JPanel.updateUI()V+2
j javax.swing.JPanel.(Ljava/awt/LayoutManager;Z)V+24
j javax.swing.JPanel.(Z)V+9
j javax.swing.JPanel.()V+2
j javax.swing.JRootPane.createGlassPane()Ljava/awt/Component;+4
j javax.swing.JRootPane.()V+11
j javax.swing.JWindow.createRootPane()Ljavax/swing/JRootPane;+4
j javax.swing.JWindow.windowInit()V+9
j javax.swing.JWindow.(Ljava/awt/Frame;)V+39
j javax.swing.JWindow.()V+5
j ru.simplex_software.vktribuna.client.MessageWindow.(Lru/simplex_software/vktribuna/client/WindowManager;)V+1
j ru.simplex_software.vktribuna.client.WindowManager.refreshModel(Lru/simplex_software/vktribuna/model/MessageStack;)V+62
j ru.simplex_software.vktribuna.client.Starter$4.run()V+34
j java.util.TimerThread.mainLoop()V+221
j java.util.TimerThread.run()V+1
v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x00007fe2e8094000 JavaThread "Keep-Alive-Timer" daemon [_thread_blocked, id=14728, stack(0x00007fe2d117e000,0x00007fe2d127f000)]
0x00007fe2ec01e800 JavaThread "JNativeHook Native Dispatch" [_thread_blocked, id=14727, stack(0x00007fe2df780000,0x00007fe2df881000)]
=>0x00007fe2d4104800 JavaThread "Timer-1" [_thread_in_native, id=14725, stack(0x00007fe2d1485000,0x00007fe2d1586000)]
0x00007fe2ec010800 JavaThread "Thread-5" [_thread_in_native, id=14723, stack(0x00007fe2d1586000,0x00007fe2d1d87000)]
0x00007fe2d40aa800 JavaThread "Thread-4" daemon [_thread_blocked, id=14722, stack(0x00007fe2d2824000,0x00007fe2d2925000)]
0x00007fe2d40a6800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=14721, stack(0x00007fe2d2925000,0x00007fe2d2a26000)]
0x00007fe2d40a5000 JavaThread "AWT-Shutdown" [_thread_blocked, id=14720, stack(0x00007fe2d2a26000,0x00007fe2d2b27000)]
0x00007fe2d4070800 JavaThread "AWT-XAWT" daemon [_thread_in_native, id=14719, stack(0x00007fe2d2b27000,0x00007fe2d2c28000)]
0x00007fe2d4056000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=14718, stack(0x00007fe2d3039000,0x00007fe2d313a000)]
0x00007fe31c00a000 JavaThread "DestroyJavaVM" [_thread_blocked, id=14695, stack(0x00007fe322b0d000,0x00007fe322c0e000)]
0x00007fe31c555800 JavaThread "GC Daemon" daemon [_thread_blocked, id=14716, stack(0x00007fe30ce3d000,0x00007fe30cf3e000)]
0x00007fe31c4a8800 JavaThread "Timer-0" daemon [_thread_blocked, id=14715, stack(0x00007fe30cf3e000,0x00007fe30d03f000)]
0x00007fe31c284800 JavaThread "Monitor Ctrl-Break" daemon [_thread_in_native, id=14712, stack(0x00007fe30e63b000,0x00007fe30e73c000)]
0x00007fe31c0aa000 JavaThread "Service Thread" daemon [_thread_blocked, id=14710, stack(0x00007fe30e99e000,0x00007fe30ea9f000)]
0x00007fe31c0a7800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=14709, stack(0x00007fe30ea9f000,0x00007fe30eba0000)]
0x00007fe31c0a4800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=14708, stack(0x00007fe30eba0000,0x00007fe30eca1000)]
0x00007fe31c0a2800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=14707, stack(0x00007fe30eca1000,0x00007fe30eda2000)]
0x00007fe31c077800 JavaThread "Finalizer" daemon [_thread_blocked, id=14700, stack(0x00007fe30f05c000,0x00007fe30f15d000)]
0x00007fe31c075800 JavaThread "Reference Handler" daemon [_thread_blocked, id=14699, stack(0x00007fe30f15d000,0x00007fe30f25e000)]

Other Threads:
0x00007fe31c071000 VMThread [stack: 0x00007fe30f25e000,0x00007fe30f35f000] [id=14698]
0x00007fe31c0b4800 WatcherThread [stack: 0x00007fe30e89d000,0x00007fe30e99e000] [id=14711]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
PSYoungGen total 35840K, used 25014K [0x00000007d8680000, 0x00000007dae80000, 0x0000000800000000)
eden space 30720K, 66% used [0x00000007d8680000,0x00000007d9a8dfc0,0x00000007da480000)
from space 5120K, 87% used [0x00000007da480000,0x00000007da8dfb60,0x00000007da980000)
to space 5120K, 0% used [0x00000007da980000,0x00000007da980000,0x00000007dae80000)
ParOldGen total 80896K, used 0K [0x0000000789400000, 0x000000078e300000, 0x00000007d8680000)
object space 80896K, 0% used [0x0000000789400000,0x0000000789400000,0x000000078e300000)
PSPermGen total 21504K, used 20453K [0x000000077ee00000, 0x0000000780300000, 0x0000000789400000)
object space 21504K, 95% used [0x000000077ee00000,0x00000007801f9648,0x0000000780300000)

Card table byte_map: [0x00007fe3187e2000,0x00007fe318bec000] byte_map_base: 0x00007fe314beb000

Polling page: 0x00007fe322c5e000

Code Cache [0x00007fe318bec000, 0x00007fe318e5c000, 0x00007fe31bbec000)
total_blobs=579 nmethods=109 adapters=424 free_code_cache=48345Kb largest_free_block=49491968

Compilation events (10 events):
Event: 8,770 Thread 0x00007fe31c0a7800 107 s! sun.misc.URLClassPath::getLoader (154 bytes)
Event: 8,775 Thread 0x00007fe31c0a4800 108 java.util.concurrent.locks.AbstractQueuedSynchronizer::release (33 bytes)
Event: 8,780 Thread 0x00007fe31c0a4800 nmethod 108 0x00007fe318cb5250 code [0x00007fe318cb53a0, 0x00007fe318cb54c8]
Event: 8,808 Thread 0x00007fe31c0a4800 109 java.util.concurrent.locks.ReentrantLock::unlock (10 bytes)
Event: 8,812 Thread 0x00007fe31c0a4800 nmethod 109 0x00007fe318cb4ed0 code [0x00007fe318cb5020, 0x00007fe318cb5128]
Event: 8,867 Thread 0x00007fe31c0a7800 nmethod 107 0x00007fe318cb7890 code [0x00007fe318cb7a60, 0x00007fe318cb88b0]
Event: 8,933 Thread 0x00007fe31c0a4800 110 java.util.concurrent.locks.ReentrantLock$Sync::nonfairTryAcquire (67 bytes)
Event: 8,937 Thread 0x00007fe31c0a4800 nmethod 110 0x00007fe318cb6450 code [0x00007fe318cb6580, 0x00007fe318cb6658]
Event: 9,164 Thread 0x00007fe31c0a7800 111 java.util.HashMap::addEntry (69 bytes)
Event: 9,180 Thread 0x00007fe31c0a7800 nmethod 111 0x00007fe318c6bb50 code [0x00007fe318c6bd20, 0x00007fe318c6c288]

GC Heap History (2 events):
Event: 3,444 GC heap before
{Heap before GC invocations=1 (full 0):
PSYoungGen total 35840K, used 30720K [0x00000007d8680000, 0x00000007dae80000, 0x0000000800000000)
eden space 30720K, 100% used [0x00000007d8680000,0x00000007da480000,0x00000007da480000)
from space 5120K, 0% used [0x00000007da980000,0x00000007da980000,0x00000007dae80000)
to space 5120K, 0% used [0x00000007da480000,0x00000007da480000,0x00000007da980000)
ParOldGen total 80896K, used 0K [0x0000000789400000, 0x000000078e300000, 0x00000007d8680000)
object space 80896K, 0% used [0x0000000789400000,0x0000000789400000,0x000000078e300000)
PSPermGen total 21504K, used 10626K [0x000000077ee00000, 0x0000000780300000, 0x0000000789400000)
object space 21504K, 49% used [0x000000077ee00000,0x000000077f860908,0x0000000780300000)
Event: 3,465 GC heap after
Heap after GC invocations=1 (full 0):
PSYoungGen total 35840K, used 4478K [0x00000007d8680000, 0x00000007dae80000, 0x0000000800000000)
eden space 30720K, 0% used [0x00000007d8680000,0x00000007d8680000,0x00000007da480000)
from space 5120K, 87% used [0x00000007da480000,0x00000007da8dfb60,0x00000007da980000)
to space 5120K, 0% used [0x00000007da980000,0x00000007da980000,0x00000007dae80000)
ParOldGen total 80896K, used 0K [0x0000000789400000, 0x000000078e300000, 0x00000007d8680000)
object space 80896K, 0% used [0x0000000789400000,0x0000000789400000,0x000000078e300000)
PSPermGen total 21504K, used 10626K [0x000000077ee00000, 0x0000000780300000, 0x0000000789400000)
object space 21504K, 49% used [0x000000077ee00000,0x000000077f860908,0x0000000780300000)
}

Deoptimization events (10 events):
Event: 2,709 Thread 0x00007fe31c00a000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00007fe318c521b8 method=java.util.Properties$LineReader.readLine()I @ 62
Event: 2,709 Thread 0x00007fe31c00a000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00007fe318c521b8 method=java.util.Properties$LineReader.readLine()I @ 62
Event: 2,709 Thread 0x00007fe31c00a000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00007fe318c521b8 method=java.util.Properties$LineReader.readLine()I @ 62
Event: 2,744 Thread 0x00007fe31c00a000 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00007fe318c521b8 method=java.util.Properties$LineReader.readLine()I @ 62
Event: 3,906 Thread 0x00007fe31c00a000 Uncommon trap: reason=unloaded action=reinterpret pc=0x00007fe318c8e590 method=java.io.BufferedReader.readLine(Z)Ljava/lang/String; @ 268
Event: 8,100 Thread 0x00007fe2d4104800 Uncommon trap: reason=unreached action=reinterpret pc=0x00007fe318c718e0 method=java.util.HashMap.get(Ljava/lang/Object;)Ljava/lang/Object; @ 1
Event: 8,100 Thread 0x00007fe2d4104800 Uncommon trap: reason=unreached action=reinterpret pc=0x00007fe318cb1314 method=java.util.HashMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; @ 19
Event: 8,114 Thread 0x00007fe2d4104800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x00007fe318c9bab4 method=java.net.URL.(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V @ 504
Event: 8,468 Thread 0x00007fe2d4104800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00007fe318c502c0 method=java.lang.String.equals(Ljava/lang/Object;)Z @ 8
Event: 8,469 Thread 0x00007fe2d4104800 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00007fe318c502c0 method=java.lang.String.equals(Ljava/lang/Object;)Z @ 8

Internal exceptions (10 events):
Event: 8,832 Thread 0x00007fe2d4104800 Threw 0x00000007d99c0b80 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247
Event: 8,835 Thread 0x00007fe2d4104800 Threw 0x00000007d99c75d8 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247
Event: 8,840 Thread 0x00007fe2d4104800 Threw 0x00000007d99d92d8 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247
Event: 8,842 Thread 0x00007fe2d4104800 Threw 0x00000007d99dd960 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247
Event: 8,844 Thread 0x00007fe2d4104800 Threw 0x00000007d99e2508 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247
Event: 8,849 Thread 0x00007fe2d4104800 Threw 0x00000007d99f4688 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247
Event: 8,862 Thread 0x00007fe2d4104800 Threw 0x00000007d99fd068 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247
Event: 8,867 Thread 0x00007fe2d4104800 Threw 0x00000007d9a01b20 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247
Event: 8,898 Thread 0x00007fe2d4104800 Threw 0x00000007d9a2b3c8 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247
Event: 8,901 Thread 0x00007fe2d4104800 Threw 0x00000007d9a2ffe0 at /build/java7-openjdk/src/icedtea-2.5.1/openjdk/hotspot/src/share/vm/prims/jvm.cpp:1247

Events (10 events):
Event: 9,432 loading class 0x00007fe2f01d4770
Event: 9,432 loading class 0x00007fe2f01d4770 done
Event: 9,432 loading class 0x00007fe2f02cb3d0
Event: 9,432 loading class 0x00007fe2f02cb3d0 done
Event: 9,435 loading class 0x00007fe2f02cd3c0
Event: 9,436 loading class 0x00007fe2f02cd3c0 done
Event: 9,436 loading class 0x00007fe2f02ce310
Event: 9,436 loading class 0x00007fe2f02ce310 done
Event: 9,438 loading class 0x00007fe2f02c9970
Event: 9,438 loading class 0x00007fe2f02c9970 done

How can i force compiling for all supported os?

Hi,
can you tell me how i can force ant to compile the native libraries for all supported operation systems instead of just my local one?

After running the build succesfully i have only compiled the native hooks for /lib/linux/x86_64/ .

Thx for you help and your useful library,

Van

No built version

Is there no way to simplify this by giving us a jar? do we need to build, I was all fired up but its too much

Compilation Problem on RedHat 5.5

Hi,
I have some problem in compiling the library under Red Hat 5.5. I checked all the dependencies and they are ok but the ant script fails at line 351 (libuiohook bootstrap). Could you please help me? I've also tried to download libuiohook standalone but I've similar error in the bootsrap phase.

Thanks in advance

JNativeHook Infinite Loop

Hey there. I had written an auto fill in jnativehook 1.1.4 sometime ago. As you know, the hook would not work anymore after some executions. That is why, I upgraded to version 1.2.1 and made the necessary changes in the code. Basically, the program is written to make a Robot perform a set of actions when the space key is pressed. However, it seems to me that whenever I press the space key, the NativeKeyReleased function is executed infinitely in turn causing the Robot to carry out the set of actions in an infinite loop! Below is the code that I have written. What am I doing wrong? I would like to point out that the program worked fine with version 1.1.4. Also, is there any way to not display the message that pops up about jnativehook during runtime. Lastly, I'd like to use Ctrl instead of space, but if I write VC_CONTROL, it gives me an error saying that no such constant exists. Thanks in advance for your help.

package org.jnativehook.example;

import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.keyboard.NativeKeyEvent;
import org.jnativehook.keyboard.NativeKeyListener;

public class AutoFill extends JPanel implements ActionListener, NativeKeyListener {
    Robot robot;
    JLabel a[];
    JTextField b[];
    JComboBox c[];
    String d[][];
    JButton e;

    public AutoFill() {
        a = new JLabel[8];
        d = new String[3][];
        d[0] = new String[]{"Visa/Master Card(Powered By ICICI Bank)", "Visa/Master Card(Powered By CITI Bank)", "Visa/Master Card(Powered By HDFC Bank)"};
        d[1] = new String[]{"VISA", "MASTER"};
        d[2] = new String[]{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
        b = new JTextField[4];
        c = new JComboBox[3];
        a[0] = new JLabel("Select A Payment Gateway: ");
        a[1] = new JLabel("Credit Card Type: ");
        a[2] = new JLabel("Credit Card Number: ");
        a[3] = new JLabel("Card Expiry Date: ");
        a[4] = new JLabel("Month:");
        a[5] = new JLabel("Year(yyyy):");
        a[6] = new JLabel("CVV Number: ");
        a[7] = new JLabel("Name on Card: ");
        b[0] = new JTextField("Please enter you credit card number", 19);
        b[1] = new JTextField(4);
        b[2] = new JTextField(4);
        b[3] = new JTextField("Please enter your name specified on the card", 24);
        c[0] = new JComboBox(d[0]);
        c[1] = new JComboBox(d[1]);
        c[2] = new JComboBox(d[2]);
        e = new JButton(" Save ");
        setLayout(new FlowLayout());
        add(a[0]);
        add(c[0]);
        add(a[1]);
        add(c[1]);
        add(new JLabel(" "));
        add(a[2]);
        add(b[0]);
        add(new JLabel(" "));
        add(a[3]);
        add(a[4]);
        add(c[2]);
        add(a[5]);
        add(b[1]);
        add(new JLabel(" "));
        add(a[6]);
        add(b[2]);
        add(new JLabel(" "));
        add(a[7]);
        add(b[3]);
        add(new JLabel(" "));
        add(new JLabel(" "));
        add(e);
        e.addActionListener(this);
        c[0].addActionListener(this);
        try {
            GlobalScreen.unregisterNativeHook();
            GlobalScreen.registerNativeHook();
        }
        catch (NativeHookException ex) {
            System.err.println("There was a problem registering the native hook.");
            System.err.println(ex.getMessage());
            System.exit(1);
        }
        GlobalScreen.addNativeKeyListener(this);
        try {
            BufferedReader obj = new BufferedReader(new FileReader("info.txt"));
            for (int y = 0; y < 3; y++) {
                int t = Integer.parseInt(obj.readLine());
                c[y].setSelectedIndex(t);
            }
            for (int x = 0; x < 4; x++) {
                b[x].setText(obj.readLine());
            }
            robot = new Robot();
            robot.setAutoDelay(10);
            robot.setAutoWaitForIdle(true);
        }
        catch (Exception e) {
        }
    }

    public static void main(String args[]) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                JFrame obj = new JFrame("Autofill");
                AutoFill obj2 = new AutoFill();
                obj.setSize(600, 300);
                obj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                obj.setLocationRelativeTo(null);
                obj.setResizable(false);
                obj.add(obj2);
                obj.setVisible(true);
            }
        });
    }

    public void actionPerformed(ActionEvent ef) {
        if (ef.getSource() == e) {
            try {
                BufferedWriter obj = new BufferedWriter(new FileWriter("info.txt"));
                if (b[0].getText().equals("Please enter you credit card number") || b[1].getText().equals("") || b[2].getText().equals("") || b[3].getText().equals("Please enter your name specified on the card") || b[0].getText().equals("") || b[3].getText().equals("")) {
                    JOptionPane.showMessageDialog(null, "Please fill in all details before saving!");
                }
                else {
                    for (int y = 0; y < 3; y++) {
                        obj.write(Integer.toString(c[y].getSelectedIndex()) + "\r\n");
                    }
                    for (int x = 0; x < 4; x++) {
                        obj.write(b[x].getText() + "\r\n");
                    }
                    obj.close();
                    JOptionPane.showMessageDialog(null, "File saved successfully!");
                }
            }
            catch (IOException e) {
            }
        }
    }

    public void nativeKeyPressed(NativeKeyEvent ef) {
    }

    public void nativeKeyReleased(NativeKeyEvent ef) {
        if (ef.getKeyCode() == NativeKeyEvent.VC_SPACE) {
            try {
                int temp;
                temp = c[0].getSelectedIndex() + 1;
                clickTab();
                clickDown(temp);
                robot.delay(50);
                clickTab();
                temp = c[1].getSelectedIndex();
                clickDown(temp);
                clickTab();
                type(b[0].getText());
                clickTab();
                temp = c[2].getSelectedIndex();
                clickDown(temp + 1);
                clickTab();
                type(b[1].getText());
                clickTab();
                type(b[2].getText());
                clickTab();
                type(b[3].getText());
            }
            catch (Exception e) {
            }
        }
    }

    public void nativeKeyTyped(NativeKeyEvent ef) {
    }

    public void clickTab() {
        robot.keyPress(KeyEvent.VK_TAB);
        robot.keyRelease(KeyEvent.VK_TAB);
    }

    public void type(String str) {
        byte[] bytes = str.getBytes();
        for (byte b : bytes) {
            int code = b;
            boolean decider = false;
            if (code > 96 && code < 123) {
                code = code - 32;
                decider = true;
            }
            if (decider == false) {
                robot.keyPress(KeyEvent.VK_CAPS_LOCK);
                robot.keyRelease(KeyEvent.VK_CAPS_LOCK);
            }
            robot.keyPress(code);
            robot.keyRelease(code);
            if (decider == false) {
                robot.keyPress(KeyEvent.VK_CAPS_LOCK);
                robot.keyRelease(KeyEvent.VK_CAPS_LOCK);
            }
        }
    }

    public void clickDown(int no) {
        for (int x = 1; x <= no; x++) {
            robot.keyPress(KeyEvent.VK_DOWN);
            robot.keyRelease(KeyEvent.VK_DOWN);
        }
    }
}

API to check Accessibility is enabled

Thank you very much for this awesome library.
Is there any way to check whether user has allowed the accessibility for the app?

When i run my app on the OS X, it asks for accessibility permission (Accessibility API is disabled!) and dialog box opens. If user does not allow accessibility, so i can display the message to allow the accessibility.
Thanks!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.