[Insight-users] Java - Missing jnilib

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Nov 18 12:54:03 EST 2008


Le 16 nov. 08 à 22:27, Robert Barnett a écrit :

>
>
> I have compiled ITK 3.10.0 and CableSwig 3.10.0 for MacOSX with java  
> wrappers. It
> appears that a jni file is not generated in the build process.
>
> java -cp /opt/itk/lib/InsightToolkit/InsightToolkit.jar:.  
> MeanImageFilter
>
> MeanImageFilter Example
> Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't  
> load library:
> /opt/itk/lib/InsightToolkit/libSwigRuntimeJava.jnilib
>    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1705)
>    at java.lang.Runtime.load0(Runtime.java:769)
>    at java.lang.Runtime.load(Runtime.java:757)
>    at InsightToolkit.itkbase.<clinit>(itkbase.java:60)
>    at
> InsightToolkit 
> .itkImageFileReader_2DJNI.<clinit>(itkImageFileReader_2DJNI.java:797)
>    at
> InsightToolkit 
> .itkImageFileReaderUS2 
> .itkImageFileReaderUS2_New(itkImageFileReaderUS2.java:67)
>    at MeanImageFilter.main(MeanImageFilter.java:14)
>
> However,
> /opt/itk/lib/InsightToolkit/libSwigRuntimeJava.so
> does exist


You can simply change the extension of that file to .jnilib, or create  
a symlink

  ln -s libSwigRuntimeJava.so /opt/itk/lib/InsightToolkit/ 
libSwigRuntimeJava.jnilib

You may also want to disable ITK_CSWIG_JAVA, and use WrapITK instead.  
You shouldn't have this kind of problem with that method.

Regards,

Gaëtan


-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.mandriva.org
http://www.itk.org  http://www.clavier-dvorak.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081118/595a4a26/attachment.pgp>


More information about the Insight-users mailing list