kwhat / jnativehook

Global keyboard and mouse listeners for Java.
Other
1.75k stars 348 forks source link

Make path to extracted dll / so configurable #377

Closed MichaelEnke closed 3 years ago

MichaelEnke commented 3 years ago

Hello, I would like to propose a simple change to make the location of the extracted library configurable. Reason: In our application the jar file resides in a read-only share. In file DefaultLibraryLocator.java, change: String libPath = classFile.getParentFile().getPath(); to String libPath = System.getProperty("jnativehook.lib.extractPath", classFile.getParentFile().getPath());

Thank you, Michael

kwhat commented 3 years ago

Well, the good news is I am currently making some enhancements to this right now. How does a property like jnativehook.lib.path sound? Ex: java -Djnativehook.lib.path=/home/user/lib?

kwhat commented 3 years ago

Ah you beat me to it, sure ill put it in right now.

kwhat commented 3 years ago

Resolved, should be in the latest snapshot as soon as it builds.

MichaelEnke commented 3 years ago

That was fast ... :-) 👍