My Kotlin Micronaut project imports a jar which itself depends on some DLLs. I have a folder lib which contains the jar I'm importing along with the dependent DLLs.
However, when I build my project I get the following error:
C:\path\project\lib\stuff.dll: Can't find dependent libraries
I'm importing the jar and DLLs like so:
dependencies {
implementation(files("lib/thing.jar"))
}
...
repositories {
flatDir {
dirs("lib")
}
}
Along with setting the following as a VM option in intelliJ:
-Djava.library.path=C:\path\project\lib
Curiously, I can execute the contents of the jar itself (it has a class which prints the library version) by cding into lib and executing the following:
PS C:\path\project\lib> java -cp thing.jar SdkInfo
Version: 1.2.3.4
Licence: Evaluation
Debug: False
Does anyone have any idea why I can run the above and it works but when I build my project it doesn't? I assume this is something related to not having the right paths set.
Thanks in advance!