This is a JVM bug, where you cannot load .dll files from paths containing non-ASCII characters. Because the JNA.dll is loaded from a path inside of the users home directory, if the username contains non-ASCII characters (as it would in most of the world), the library fails to load.
This is a JVM bug, where you cannot load
.dll
files from paths containing non-ASCII characters. Because the JNA.dll is loaded from a path inside of the users home directory, if the username contains non-ASCII characters (as it would in most of the world), the library fails to load.The workaround is to load it from a temp directory outside of the user home directory. Here is how I solved this for another library, where I have control over the temp directory, might be useful as an example: https://github.com/RiftIntelFusionTool/RIFT/blob/release/src/main/kotlin/dev/nohus/rift/database/SqliteInitializer.kt
Exception:
(This in turn makes the tray icon library not work for these users)