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

Bernard Giroux giroux at geo.polymtl.ca
Wed Aug 2 14:36:46 EDT 2006


Do you instatiate the vtkStructuredGrid before the vtkPanel?  If yes,  
this is the problem: the vtk libraries are loaded by the vtkPanel  
object (look in vtkPanel.java for the following lines...)


   static {
     System.loadLibrary("vtkCommonJava");
     System.loadLibrary("vtkFilteringJava");
     System.loadLibrary("vtkIOJava");
     System.loadLibrary("vtkImagingJava");
     System.loadLibrary("vtkGraphicsJava");
     System.loadLibrary("vtkRenderingJava");
     try {
       System.loadLibrary("vtkHybridJava");
     } catch (Throwable e) {
       System.out.println("cannot load vtkHybrid, skipping...");
     }
     try {
       System.loadLibrary("vtkVolumeRenderingJava");
     } catch (Throwable e) {
       System.out.println("cannot load vtkVolumeRendering,  
skipping...");
     }
   }



Le 06-08-02 à 13:59, John L. Papp a écrit :

> 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.
>
> Background:
>
> 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
>
> John
>
>
> -- 
> 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
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on- 
> topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

---
Bernard Giroux, ing., Ph.D.
Associé de recherche

http://geo.polymtl.ca/~giroux







More information about the vtkusers mailing list