Reputation: 783
I'd like to use GDCM in Java, but somehow I fail using it. I downloaded precompiled files for win x86. I've never tried to include a SWIG library, so I may did something wrong. I tried to include the gdcm.jar in original folder, and as a copy.
What I did(using Netbeans): Added the gdcm.jar at Project->Properties->Libraries->Compile->Add Jar
Error:
java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.UnsatisfiedLinkError: gdcm.gdcmJNI.swig_module_init()V
at gdcm.gdcmJNI.swig_module_init(Native Method)
at gdcm.gdcmJNI.<clinit>(gdcmJNI.java:2751)
How to correctly use it? Thanks a lot!
Upvotes: 0
Views: 707
Reputation: 598
You need to add libgdcmjni.jnilib to your library path in java using:
-Djava.library.path="Path to directory that contains libgdcmjni.jnilib"
Upvotes: 1