-
Notifications
You must be signed in to change notification settings - Fork 45
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
Swing crashes when having bad native link #19
Comments
yes, there seems to be a conflict between your system jna, and what the library is using. See java-native-access/jna#281 possible workaround is to pass "-Djna.nosys=true" to the java process. I'll try to update jna dependency to latest version, so that there is no conflict. If nothing seems to break, I'll release a new version ;) |
Thanks for the quick answer. I will try that. I did found a workaround by initializing the Producer in Would you mind if I did a screencast about your project? With You library is so easy to use and implements. I think it's worth doing a Have a great day! Patrick Balleuxhttp://about.me/patrickballeux Le 2014-08-15 à 14:23, Denis Tulskiy [email protected] a écrit : yes, there seems to be a conflict between your system jna, and what the possible workaround is to pass "-Djna.nosys=true" to the java process. I'll try to update jna dependency to latest version, so that there is no — |
yeah, feel free to do a screencast :) |
could you please also try snapshot version with latest jna version? https://github.com/tulskiy/jkeymaster/blob/master/README.md#maven |
Hi,
I am using jKeyMaster in my project ScreenStudio (screenstudio.crombz.com). The library does work well. But I am facing one issue where I'm trying to catch the exception is some libraries are missing.
Basically, I have this case:
Using a "third-party" jna.jar instead of the native one, there is an issue between jna.jar and the libjna-java libraries. This is a case that can happen when people are not installer the proper dependencies.
What I am trying to do is to catch the error to be able to tell the user that the current setup is not working as expected and "Hot keys" won't work.
This is the exception from the console...
15-Aug-2014 10:30:46 AM com.tulskiy.keymaster.x11.X11Provider$1 run
INFO: Starting X11 global hotkey provider
Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: Can't obtain updateLastError method for class com.sun.jna.Native
at com.sun.jna.Native.initIDs(Native Method)
at com.sun.jna.Native.(Native.java:139)
at com.tulskiy.keymaster.x11.X11.(X11.java:31)
at com.tulskiy.keymaster.x11.X11Provider$1.run(X11Provider.java:54)
at java.lang.Thread.run(Thread.java:701)
The problem is that I cannot catch the exception, coming from a thread and basically, the Swing GUI does not show making impossible showing an error message to the user.
I am using jKeymaster 1.1 binary build.
Possible solutions: Have an event "OnError" or throw an exception on the ".reset" or the ".register".
I will try to find a work-around but it would be nice if the exception would not freeze the main program.
Thanks!
The text was updated successfully, but these errors were encountered: