I managed to get into a Linux machine to try the HotKey library suggested in this answer.
I compiled the sample code, and now I run the program, and I have the following message:
[ oracle@machine jxgrabkey-0.2.1_i386] $ java -classpath lib / JXGrabKey.jar: Example JXGrabKeyTest
Exception in thread "main" ** java.lang.UnsatisfiedLinkError: ** /home/oracle/javasample/jxgrabkey-0.2.1_i386/lib/libJXGrabKey.so: /usr/lib/libstdc++.so.6: version `GLIBCXX_3. 4.9 'not found (required by /home/oracle/javasample/jxgrabkey-0.2.1_i386/lib/libJXGrabKey.so)
at java.lang.Runtime._load (libgcj.so.7rh)
at java.lang.Runtime.load (libgcj.so.7rh)
at java.lang.System.load (libgcj.so.7rh)
at JXGrabKeyTest.main (JXGrabKeyTest.java:17)
I know how to handle this on Windows (just adding a DLL to PATH env var), but I'm not sure about Linux.
I read something about LD_LIBRARY_PATH and some other env vars, but I can make it work.
Any tips?
EDIT
After supporting mmyers for problem determination and reading, this thread and this other .
I can say:
My system: Linux 2.6.18-53.el5
My version of GCC (is):
GCC-C ++ - 4.1.2-14.el5
GCC-gfortran-4.1.2-14.el5
libgcc-4.1.2-14.el5
GCC-4.1.2-14.el5
Problems: I need gcc 4.2.0
Aaand, apparently there is no gcc 4.2.0 for my system.
I think I have to wait until this happens, or the author recompiles it in the previous version.
mmyers, thank you very much for your help.
source share