[Insight-users] ITK SwigRuntimeJava
louu013
michael.lacroix at student.uclouvain.be
Sat May 5 11:14:13 EDT 2012
Hello,
I'm trying to use itk with the sample code given in the examples section
import InsightToolkit.*;
// Simple program for ITK image read/write in Java
public class Example
{
public static void main( String argv[] )
{
itkImageFileReaderIUC2_Pointer reader = new
itkImageFileReaderIUC2_Pointer();
itkImageFileWriterIUC2_Pointer writer = new
itkImageFileWriterIUC2_Pointer();
reader.SetFileName( argv[0] );
writer.SetFileName( argv[1] );
writer.SetInput( reader.GetOutput() );
writer.Update();
}
}
I've included the itk.jar in my project (I'm running eclipse) and setup the
DYLD_LIBRARY_PATH (I'm on MacOSX)
But still i'm getting this:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no
SwigRuntimeJava in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1758)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1045)
at InsightToolkit.itkbase.<clinit>(itkbase.java:75)
at
InsightToolkit.itkImageFileReaderJNI.<clinit>(itkImageFileReaderJNI.java:1928)
at
InsightToolkit.itkImageFileReaderIUC2_Pointer.<init>(itkImageFileReaderIUC2_Pointer.java:56)
at Example.main(Example.java:12)
Any idea ?
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-SwigRuntimeJava-tp7530400.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list