Is there a way to use the dll as a separate dependency and thus avoid unzipping that takes place during application launch?
We manually extracted the DLLs and and told the installer to include them in the installation package and unpack them during installation. (Maybe we could have asked the installer to do the extraction from the .jar while installing... we use a Java-based installer that can run code from the jar files being installed, so that would have been an option.)
JNA comes with a mechanism to use a preexisting DLL instead of extracting the included one.
Caveats:
DLL handling indeed proved to be a hurdle to take. I’d have liked to see separate Maven artifacts for “JNA with extract-at-runtime DLLs” and “JNA with pre-extracted DLLs, JNA not even trying to extract them” (even having the code path is scary, I did some serious debugging to make 150% sure that that can’t happen, but I’d have to redo that with every JNA update so I don’t like that one bit).
Disclaimer: We could successfully make JNA work with that approach, and we validated that it in fact does not extract the DLLs, but we haven’t finished the path to actually building and distributing an installer package.
Validate what I’m saying before you rely on it (that’s generally what one should do for advice from the Internet, anyway ;-) )
Regards
Jo
--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jna-users+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jna-users/ce60001e-30a1-45bf-be50-b6bf263bca70n%40googlegroups.com.
Sensitivity: C2 Internal
The content of this e-mail is intended only for the
confidential use of the person addressed.
If you are not the intended
recipient, please notify the sender and delete this e-mail immediately.
Thank
you.