Where do i get SimpleITK JNI Lib?

61 Views Asked by At

using intellij in windows and i'm getting this error: java.lang.UnsatisfiedLinkError: no SimpleITKJava in java.library.path

reading this tutorial: https://itk.org/Wiki/SimpleITK/GettingStarted/A_visual_guide_to_SimpleITK_in_Java

i find a fix:

"...Set the Native library location to the directory containing the platform specific JNI library...SimpleITKJava.dll on Windows..."

where do i get this JNI library? Do i get this by building SimpleITK with cmake? if so, how exactly? Cant find any answer, i already know how to set the Native library location in intellij, and my pom.xml run with no errors or warnings.

2

There are 2 best solutions below

0
Salu Ramos On BEST ANSWER

Coming back after some time, using gradle was the best for me, using local binary file that i downloaded from https://github.com/SimpleITK/SimpleITK/releases:

implementation files('SimpleITK-2.3.0/simpleitk-2.3.0rc1.post2.jar')
1
Salu Ramos On

i managed to find the JNI lib: https://github.com/SimpleITK/SimpleITK/releases

ctrl+f "java" and download SimpleITK-2.2.1-Java-win64.zip or newer version. There is no need of building anything.

unzip and now you have the necessary files. Now, if you are using intellij manage to put this in to your "run/edit configurations/vm options"

-Djava.library.path="C:\your-path\SimpleITK-2.2.1-Java-win64"

Newer intellij versions will have 'vm options' as a hidden configuration. you can enable it inside "run/edit configurations" on top right option "modify options"

hope i will help someone in the future