gpt4 book ai didi

java - 树莓派上的 JNativeHook

转载 作者:行者123 更新时间:2023-11-29 09:01:47 27 4
gpt4 key购买 nike

我正在尝试在 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 上运行?

最佳答案

您需要将jar 中包含的原生库重新编译为ARM。它应该在 Linux 上编译没有任何问题,使用 ant compile jar 来构建。如果你想file a bug报告我将与您一起获得支持的 arm 二进制文件。

关于java - 树莓派上的 JNativeHook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17001382/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com