2

我正在尝试在 Raspberry Pi 平台上使用 JNativeHook

我有一个简单的 java 可执行文件,在 Mac 和 Windows 上运行良好,我认为应该在基于 Debian 的 linux 发行版上运行良好......

但是在启动时我得到:

Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at Main.<init>(Main.java:159)
at Main$1.run(Main.java:129)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:682)
at java.awt.EventQueue$3.run(EventQueue.java:680)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
Caused by: java.lang.RuntimeException: Unable to locate the native library.
at org.jnativehook.GlobalScreen.loadNativeLibrary(Unknown Source)
at org.jnativehook.GlobalScreen.<init>(Unknown Source)
at org.jnativehook.GlobalScreen.<clinit>(Unknown Source)
... 16 more

所以我必须做一些额外的事情才能在 Linux 上工作?

4

1 回答 1

0

您需要将 jar 中包含的本机库重新编译为 ARM。它应该在 Linux 上编译没有任何问题,ant compile jar用于构建。如果您想提交错误报告,我将与您一起获得支持的 arm 二进制文件。

于 2014-07-01T00:12:52.973 回答