Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loading error on RPI 3 #155

Closed
Pioterk opened this issue Mar 7, 2017 · 12 comments
Closed

loading error on RPI 3 #155

Pioterk opened this issue Mar 7, 2017 · 12 comments
Assignees
Milestone

Comments

@Pioterk
Copy link

Pioterk commented Mar 7, 2017

Dear,

I have problem with starting my app on linux, from IDE and direct from win everthink is ok, but on linux I'm getting following error:

**_native lib Version = RXTX-2.2pre2
mar 06, 2017 7:54:44 PM org.jnativehook.DefaultLibraryLocator getLibraries
SEVERE: Unable to extract the native library /org/jnativehook/lib/linux/arm/libJNativeHook.so!

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: org.jnativehook.GlobalScreen.getAutoRepeatRate()Ljava/lang/Integer;
at org.jnativehook.GlobalScreen.getAutoRepeatRate(Native Method)
at org.jnativehook.GlobalScreen.(Unknown Source)
at the.main.pac.TheModbusSimpleTesterWindow$1.run(TheModbusSimpleTesterWindow.java:74)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)_**

Thanks for help in advance

@kwhat
Copy link
Owner

kwhat commented Mar 7, 2017

Hi,

It looks like the program was unable to extract the native library.

SEVERE: Unable to extract the native library /org/jnativehook/lib/linux/arm/libJNativeHook.so!

By default that is extracted to the users temp location, so maybe you don't have access to write to that location, or maybe Java couldn't locate the running jar to extract it? All of the library loading is overridable via the library locator. I went into detail about how to do that in issue #148.

@hectomg
Copy link

hectomg commented Mar 17, 2017

Hi @Pioterk , if you are usign the 2.1.0 or later it has just "arm6" library for linux. I solved that just modifing the jar file of the hook. jnativehook-2.1.0.jar . In ubuntu I opened the jar file with "file manager" and enter in the path "/org/jnativehook/lib/linux/" inside the jar file, and then I modified the folder called "arm6" to just "arm" and it is all what i did. It works for me. I tried to use a lower version of the library which has the correct folder but they are not working detecting special keys for me, so i did that.

This is not the optimal solution but it works!

Regards,

@Pioterk
Copy link
Author

Pioterk commented Mar 19, 2017

Hi, @hectomg @kwhat , thanks for your sugestions, I did as @hectomg wrote, now I have following error:

INFO: Library extracted successfully: /tmp/libJNativeHook-54E231ABFC77C29C360699F2DC7D4768CD15FA26.arm.so (0x54E231ABFC77C29C360699F2DC7D4768CD15FA26).

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: /tmp/libJNativeHook-54E231ABFC77C29C360699F2DC7D4768CD15FA26.arm.so: libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1083)
at org.jnativehook.GlobalScreen.(Unknown Source)
at the.main.pac.TheSoftwareMainWindow.goOnLine(TheSoftwareMainWindow.java:156)
at the.main.pac.TheSoftwareMainWindow$1.run(TheSoftwareMainWindow.java:43)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Do you have any ideas?

@kwhat
Copy link
Owner

kwhat commented Mar 21, 2017 via email

@kwhat kwhat modified the milestones: 2.1.0, 2.1.1 Apr 18, 2017
@kwhat kwhat self-assigned this Apr 18, 2017
@mdudzak
Copy link

mdudzak commented Apr 19, 2017

same problem here on latest raspbian image with java 8u133 and embedded gluon javafx

@kwhat
Copy link
Owner

kwhat commented Apr 19, 2017

@mdudzak same error? Do you have libxkbcommon installed?

@ghost
Copy link

ghost commented Mar 17, 2018

I had this same problem using 2.10, this comment handles it for me completely.

With windows "arm6" jar path can be edited very easily to "arm" with 7zip. Thanks! @hectomg

@kwhat
Copy link
Owner

kwhat commented Mar 18, 2018

@ejerrywest Does the RP 3 use arm7? Is there a os property to differentiate between arm6 /7 in the arm7 JRE you are running, or does it just say "arm"?

@kwhat
Copy link
Owner

kwhat commented Mar 18, 2018

oh i see, it just has the wrong folder name, eh I really need to put out a patch build

@ghost
Copy link

ghost commented Mar 19, 2018

@kwhat I am using RP2 with ARMv7, RP3 is ARMv8 and RP is ARMv6. They are all just "arm". Thanks for checking it out, this is a great project!

@MarkJeronimus
Copy link

I had the same error on Orange Pi running Armbian. Same directory rename in the jar (arm6->arm) fixed it.

@kwhat
Copy link
Owner

kwhat commented Sep 27, 2021

I've made several arm updates in 2.2, hopefully this issue has been addressed. If not, please reopen this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants