The most straightforward way is to put Umsdevtool_sp30.dll under System32, Mapper interface inherits Librarymapper Instance3 = (Mapper) native.loadlibrary (" Umsdevtool_sp30 ", Mapper.class);
Use JNA when loading the dynamic library, the error is as follows:
exception in thread "Main" java.lang.unsatisfiedlinkerror: unable to load library ' Umsdevtool_sp30 ': native library (win32-x86-64/umsdevtool_sp30.dll) not found in resource path ([file:/d:/workspaces_for_java/jnadll/bin/, file:/d:/ Workspaces_for_java/jnadll/lib/jna-4.1.0.jar]) at Com.sun.jna.NativeLibrary.loadLibrary (nativelibrary.java:271) at Com.sun.jna.NativeLibrary.getInstance (nativelibrary.java:398) at Com.sun.jna.library$handler.<init> (library.java:147) at Com.sun.jna.Native.loadLibrary (native.java:412) at com.sun.jna.native.loadlibrary ( native.java:391) at com.win32.Mapper.<clinit> (mapper.java:21) at com.win32.main.main (Main.java:8)
the problem is that the dynamic library is +bit, and theJDKis a -bit, so if you want to invoke the +bit ofJDKmust be +and correspondingly, if the dynamic library is -bit, must be used -bitJDK.
JNA Call DLL Java.lang.UnsatisfiedLinkError