Login  Register

dll "Access is denied" vs "Can't load library"

Posted by runiter on Mar 26, 2015; 5:56pm
URL: https://forum.jogamp.org/dll-Access-is-denied-vs-Can-t-load-library-tp4034197.html

It appears that there is a problem with the way both jogl and webstart deal with dll files.

If you I let jogl to deal with dll some of customers report this exception:

java.lang.UnsatisfiedLinkError: C:\Users\<user>\AppData\Local\Temp\jogamp_0000\file_cache\jln6017272868593155272\jln2310512220959375414\gluegen-rt.dll: Access is denied

If I used System.setProperty("jogamp.gluegen.UseTempJarCache", "false") to disable jogl's way of handling dll, then it fixes the problem with above exception for my customers, but some other customers who didn't have any problem previously now get the following exception:

java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\<user>\Desktop\gluegen-rt.dll

It appears that none of the above methods is perfect. Perhaps you could modify your jogl jar extract method so that if it fails, instead of throwing the "Access is denied" exception, it continues normally (with just a warning) so that webstart nativeLib could give it a try too.
Saeid Nourian, Ph.D. Eng. | Graphing Calculator 3D