[vtkusers] java.lang.UnsatisfiedLinkError: VTKInit ... again

John L. Papp jpapp at craft-tech.com
Wed Aug 2 13:59:07 EDT 2006

OK, I've searched around this group as well as the web and have not 
found any 'fix' for the problem.  This can mean 1)  It was fixed by one 
of the suggestions but nobody posted this or 2) There is no fix.  My 
obvious question is what is causing this and how to fix it.


I compiled VTK both v4.4.2 and v5.0.1 for Java with what I assume are 
the correct cmake options.  I have BUILD_SHARED_LIBS on, VTK_WRAP_JAVA 
on, VTK_USE_HYBRID on and have set various other parameters to get cmake 
to generate whatever it generates.  I then did a make and everything 
seemed to work OK.  Things are in slightly different places for each 
version but I was able to get the SampleVTK.java program compiled and 
running successfully.  I was even able to lift the vtkPanel object from 
SampleVTK.java and place it in my own Java program and get it to work.  
The problem comes when I want to instantiate a vtkImageData, or 
vtkPlot3DReader, or vtkStructuredGrid so that I can put one of my own 
objects in the panel.  But, any time I do a :

vtkStructuredGrid sgrid = new vtkStructuredGrid();

I get the classic:

Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit
        at vtk.vtkStructuredGrid.VTKInit(Native Method)
        at vtk.vtkObject.<init>(vtkObject.java:98)
        at vtk.vtkDataObject.<init>(vtkDataObject.java:286)
        at vtk.vtkDataSet.<init>(vtkDataSet.java:154)
        at vtk.vtkPointSet.<init>(vtkPointSet.java:86)
        at vtk.vtkStructuredGrid.<init>(vtkStructuredGrid.java:202)
        at SimpleVTK.<init>(SimpleVTK.java:20)
        at SimpleVTK.main(SimpleVTK.java:54)

I assume that this has something to do with the libraries.  I have my 
LD_LIBRARY_PATH set to the location of all the "*.so" files created 
after the make and even have the CLASSPATH variable set to the java/vtk 
location as well as the bin/vtk.jar file.  What gives?  Anyone have a 
suggestion.  Basically, I'm at a standstill until this gets resolved.

Thanks in advance for any help


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.5/405 - Release Date: 8/1/2006

More information about the vtkusers mailing list