[vtkusers] java.lang.UnsatisfiedLinkError can't load libvtkRenderingJava

Denis Barbier bouzim at gmail.com
Wed Nov 12 04:38:26 EST 2008


On 2008/11/11 Shun Wong wrote:
> Hi everyone,
>
> I get such an error when I am trying to load the rendering library in java.
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> /vol/project/2008/362/g0836222/VTK/bin/bin/libvtkRenderingJava.so.5.2.0:
> libmawt.so: cannot open shared object file: No such file or directory
>   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
>   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
>   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
>   at java.lang.System.loadLibrary(System.java:1030)
>   at panel.<clinit>(panel.java:24)
>   at Mainvtk.main(Mainvtk.java:8)
>
> I am sure the java can laod the libvtkRenderingJava.so.5.2.0
> I am using eclipse in a 32-bit linux.
> what should I do to make it work?(I guess the rendering library needs to be
> linked with libmawt.so while compilation)

You do need to compile anything, but runtime linker has to know where to
find this library.  For instance set LD_LIBRARY_PATH to the directory
containing this library when calling eclipse:
  $ LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun/jre/lib/i386/xawt eclipse
You can certainly tell eclipse to look for libraries in this directory so that
you do not have to set LD_LIBRARY_PATH, but I do not know eclipse.

Denis



More information about the vtkusers mailing list