[Insight-users] Error accessing Java-ITK\'s share libs
Alejandro Canales Ochoa
aco at cion.com.mx
Mon, 8 Mar 2004 18:06:57 -0600
Pablo
The problem is that the jar InsightToolkit.jar should be in the ITK distribution directory. I have post this issue in February:
> The second issue: After the compilation succeed, I move the jar (InsightToolkit.jar) and the corresponding Dll’s from the build path to another directory. When I run my first program, the java runtime was unable to load the native libraries, no mater I correctly set my CLASSPATH and my PATH (currently I use windows) environment variables to the directory where I move the files.
> I look the source code of a class named itkbase and I see that the class expects the Dlls to be in the installation directory, so I point my library path to this directory and voila!, it works!. I think that hard coding the path of the Dlls in this class removes flexibility to the applications developed with the ITK java Wrappers.
Brad answers me as follows:
This also lets it work from the build tree out of the box without
setting anything but the classpath to point at the jar. What it should
probably do is look in the directory containing the jar first, and then
in the hardcoded path. Please add this as a feature request to the bug
tracker at
http://www.itk.org/Bug
Thanks,
-Brad
I hope this help
Alejandro Canales
El Fri, 05 Mar 2004 08:47:36 -0500, pablob at grasp.cis.upenn.edu escribio:
>Hi everybody,
>
>I am developing a Java app which uses ITK. Since I am developing
>plug-ins, the my runtime environment requires every related lib to be
>located under the plug-in's root directory. Even tough I am able to
>access the classes in InsightToolkit.jar (moving the jar to the
>plug-in's root), I keep getting the following message during runtime (my
>platform is Windows XT, BTW):
>
>"Unhandled exception caught in event loop.
>Reason:
>Expecting an absolute path of the library: \SwigRuntimeJava.dll"
>
>Any suggestions on how to overcome this problem?
>
>Thanks,
>Pablo
>
>______________________________________________________________________
>This email has been scanned by the MessageLabs Email Security System.
>For more information please visit http://www.messagelabs.com/email
>______________________________________________________________________
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>