Reputation: 8082
To run tests with jni helper library I add such code into build.gradle
:
def jniLibDir = "xxx"
tasks.withType(Test) {
systemProperty "java.library.path", jniLibDir
}
and ./gradlew build
works without problems,
but idea
reports error:
Can not resolve symbol systemProperty
and if run test under idea
it throw java.lang.UnsatisfiedLinkError exception.
How help to idea
to understand where take my dll
with jni code?
Upvotes: 2
Views: 705
Reputation: 401897
Related issue:
You will need to add -Djava.library.path=/path/to/dir/with/native/libs
into IntelliJ IDEA Run/Debug configuration VM Options field. This can be changed for the configuration under Defaults node so that it's added automatically to all the new tests you run from the right click menu.
Upvotes: 1