Hi,
Am Samstag, dem 14.10.2023 um 00:06 -0700 schrieb Valentin-Ionut Stanciu:
That being said, I downloaded the source code for JNA (from GitHub) and added into the project (I'm using Eclipse + Adoptium), but beside the source code, I didn't expect that I would need some DLL files also (I'm getting java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/win32-x86-64/jnidispatch.dll) not found in resource path). So, can someone help me create the DLL files that JNA is using with some steps or a link to how to do it? Or is it fine to extract them from the JAR files and they will work the same without problems? I'm asking as I did found this DLL file inside win32-x86-64.jar. The game will only be available on Windows x64, and everything that I'm doing is for that platform only.
JNA uses libffi to invoke native functions. jnidispatch is the glue layer between the java part of JNA and libffi. Calling into native without external help will be possible once project panama is fully integrated into the JDK.The question I would raise is: Why compile from source in the first place? JNA distributes binaries to maven central and these include the native parts for several platforms, including windows x64/x86-64/amd64.
The java and native parts of JNA are tightly coupled. This is also enforced by version checks when loading the glue library. This is what you are seeing in your second message:
There is an incompatible JNA native library installed on this system
Expected: TEMPLATE
Found: 7.0.0