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

Do not load statically #249

Closed
xeruf opened this issue Jan 8, 2019 · 2 comments · May be fixed by #251
Closed

Do not load statically #249

xeruf opened this issue Jan 8, 2019 · 2 comments · May be fixed by #251

Comments

@xeruf
Copy link

xeruf commented Jan 8, 2019

Due to a bug, initializing JNativeHook kept crashing on Linux during initialization. Well, we thought, as long as we don't register anything it should be fine. But nope, the native library is loaded in a static block in GlobalScreen.
In my opinion, this is a no-go. The library should only load when you tell it to and not as soon as it is accessed in any way.

@sghpjuikit
Copy link

I agree.

In order to avoid introducing major changes and inconveniencing developers with usage more complicated then necessary, perhaps it would be fine simply if the native resources loaded when they are first required, probably in GlobalScreen.registerNativeHook

@sghpjuikit
Copy link

As I understand due to native code it is necessary to load the native libraries in static block. This issue can probably be closed then.

@xeruf xeruf closed this as completed Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants