[vtkusers] vtk4: java.lang.UnsatisfiedLinkError

Chris Johnson chrisj at epcc.ed.ac.uk
Thu Jan 10 06:22:43 EST 2002


Hi folks,

Info/keywords: java, UNIX, vtk4, library, UnsatisfiedLinkError

I was recently using vtk3.2, but found no real support for java - in
particular there seemed to be a well-documented, but apparently unsolved,
"java.lang.UnsatisfiedLinkError". I have now swapped to vtk4 and 
completely rebuilt on a different machine, but still receive the same
kind of errors. In particular, whilst running the `Cone' example in
$VTK_HOME/Examples/Tutorial/Step1/Java I get:

vtk at lomond$ java Cone 
Exception in thread "main" java.lang.UnsatisfiedLinkError: no
vtkCommonJava in java.library.path
        at java.lang.Throwable.fillInStackTrace(Native Method)
        at java.lang.Throwable.fillInStackTrace(Compiled Code)
        at java.lang.Throwable.<init>(Compiled Code)
        at java.lang.Error.<init>(Error.java:50)
        at java.lang.LinkageError.<init>(LinkageError.java:43)
        at
java.lang.UnsatisfiedLinkError.<init>(UnsatisfiedLinkError.java:42)
        at java.lang.ClassLoader.loadLibrary(Compiled Code)
        at java.lang.Runtime.loadLibrary0(Runtime.java:470)
        at java.lang.System.loadLibrary(System.java:778)
        at <Unloaded Method>
vtk at lomond$ echo $LD_LIBRARY_PATH 
/opt/local/lib:/opt/local/interviews/lib/SUN4:/home/vtk/VTK41/bin:/usr/lib/
vtk at lomond$ ll /home/vtk/VTK41/bin/*vtkCommonJava*
-rwxr-xr-x   1 vtk      epcc     8130648 Jan  4 16:46
/home/vtk/VTK41/bin/libvtkCommonJava.so
vtk at lomond$ ldd /home/vtk/VTK41/bin/libvtkCommonJava.so 
        libpthread.so.1 =>       /usr/lib//libpthread.so.1
        libdl.so.1 =>    /usr/lib//libdl.so.1
        libm.so.1 =>     /usr/lib//libm.so.1
        libc.so.1 =>     /usr/lib//libc.so.1
        libthread.so.1 =>        /usr/lib//libthread.so.1
        /usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1
vtk at lomond$ 

If you follow through the commands, it appears that there is no obvious
problem with my LD_LIBRARY_PATH (as I far as I can tell!), and I believe
my CLASSPATH to be correct. I see that variations on this error are still
presented in the mailing list, even for vtk4, which on the whole seems
much improved, but I find no documented solution. Has anybody got any
further with this? A couple of other examples I've tried produce the same
kind of error.

Any help would be appreciated.

Many Thanks,
Chris




More information about the vtkusers mailing list