I am dependent on a library src/main/resources/libs64/thelib.dll
which I need to load at runtime
System.setProperty("java.library.path",
Paths.get(System.getProperty("user.dir"),
"src", "main", "resources", "libs64").toAbsolutePath().toString())
When I run the spring boot app
mvn package
java -jar springapp.jar
I tells me
java.lang.UnsatisfiedLinkError: no src/main/resources/libs64/thelib in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) ~[na:1.8.0_92]
at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[na:1.8.0_92]
at java.lang.System.loadLibrary(System.java:1122) ~[na:1.8.0_92]
When I set the library path src/main/resources/libs64
in Eclipse it works and the java.library.path
prints out to the same as
Paths.get(System.getProperty("user.dir"),
"src", "main", "resources", "libs64").toAbsolutePath().toString())
Thanks for the help