I am using java with Netbeans on a 64bit PC.
For 64bit application, I use a 64bit JRE with edk.dll(64bit) and jna.jar.
For 32bit application, I use a 32bit JRE with edk.dll(32bit) and the same jna.jar.
1st question: For 64bit application, when I run the program, Netbeans can find the edk.dll(64bit) only if it is put in System32 folder.
When I put the dll in the root of my Netbeans project folder or in the jdk..\jre\lib\ext\ folder, Netbeans can’t find the dll while it should find it.
2nd question: For 32bit application, Netbeans cannot find the edk.dll(32bit) even if is put in System32. Why?
I am using Eclipse. but i think they are same on reference to Edk lib. Normaly, we can config in IDE, so make sure you did this right way. ^^!
Try to install “Redistributable Packages” follow 32b or 64b edk.dll that you want to use. https://www.microsoft.com/en-us/download/details.aspx?id=40784
or the easiest way, you find and push msvcp120.dll and msvcr120.dll is same folder with EDk lib and configuration your IDE refer to those lib.
I tried different things for the 32bit edk.dll:
* I put the msvcp120.dll and msvcr120.dll in the IDE edk lib -> no result
* I downloaded the Redistributable packages and installed it -> no result
* I moved my project to Eclipse and I configured the project lib and dll path -> no result
The dll is still not found by any method (“java.lang.UnsatisfiedLinkError: Unable to load library ‘edk’: Native library (win32-x86/edk.dll)”).
Is there a different jna.jar for 32bit and for 64bit, or is it the same file?
Hi Hoang Pham,
it was indeed a problem of configuration and now I could make it work on both Eclipse and Netbeans:
* in Eclipse, I had to set the PATH environment variable (as indicated in your pdf) to indicate in which folder the .dll is
* in Netbeans, I had to go in Project properties\libraries\compile and click on “add JAR/folder” to indicate in which folder the .dll is
Thank you very much for your help,