Hello,
We have a Java desktop application that uses JNA for a few small parts of native integration in Windows, OS X and Linux. It is an extremely useful library and has worked great for us.
Recently I've had a report from some users that our application is throwing an unexpected error on startup. We have a application log they can send us to review the error and it shows the following stacktrace:
java.lang.UnsatisfiedLinkError: C:\Users\NMR-Tiger\AppData\Local\Temp\jna--1360109371\jna8976287336737292997.dll: Access is denied
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 com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:761)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:736)
at com.sun.jna.Native.<clinit>(Native.java:131)
at com.sun.jna.NativeLibrary.<clinit>(NativeLibrary.java:82)
...
This arises from some of our startup code initializing JNA to enable some of our native Windows integration. The odd thing is I have never seen this error locally but have seen it from at least a couple of users...
My thought is that they have some antivirus or security software installed that is somehow blocking our process from loading the jna dispatch dll from their temp directory...
Has anyone else encountered a similar issue in Windows with the temp file extraction and loading?
Oh I forgot to mention that we are also using the latest JNA release (4.1).
Thank-you,
Charles Smith
Chenomx Inc.