I know that I have to store my libraries into java.library.path folders. I put my dll insite c:\windows\system32 folder (I'm using 32bit jre) and I tried this code:
public static void main(String[] args) {
System.out.println(System.getProperty("java.library.path"));
System.loadLibrary("ZebraNativeUsbAdapter_32");
}
And I got this output:
C:\Program Files (x86)\Java\jre1.8.0_73\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\Programmi\Skype\Phone\;C:\Program Files\SourceGear\Common\DiffMerge\;C:\Program Files\MariaDB 10.1\bin;.
And this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no ZebraNativeUsbAdapter_32 in java.library.path
Then I tried to put dll file into C:\Program Files (x86)\Java\jre1.8.0_73\bin and it works! But why both folder were listed in java.library.path but only one of these works?