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

Christian schnabilo.chris at gmx.de
Mon May 10 10:18:03 EDT 2004


Hi Shyam!

That is what i just did. But i downloaded the version vtk422 binary from
the kitware ftp-site. And that seemed to prove (in my case) what i
thought:
Something is wrong with the new release i downloaded. After installing
the older build i mentioned above, everything works just perfect. Maybe
the jarfile in the latest release is broken. Don't know what it is, but
the older version works just fine. Using the latest release crashes the
application with the mentioned errormessage.
What do you think about that?

--Chris 

-----Ursprüngliche Nachricht-----
Von: R K Shyam Prakash [mailto:ramakrishna.prakash at quest-global.com] 
Gesendet: Montag, 10. Mai 2004 16:16
An: 'Christian'; vtkusers at vtk.org
Betreff: RE: [vtkusers] java.lang.UnsatisfiedLinkError: VTKInit again
and again

Chris,
	It works for me. I tried the progam with vtk 4.2 binary
(downloaded from vtk web site) and jre 1.4.2_03. One more thought. Do
you have jawt.dll in your system path ? Does the program pop up any
error dialog before exiting? Can you run the sample tcl programs using
vtk.exe? Just to confirm, can you compile and run the program from
console?. May be some settings with eclipse is giving the problem. Let
me know

--Shyam

> -----Original Message-----
> From: Christian [mailto:schnabilo.chris at gmx.de] 
> Sent: Monday, May 10, 2004 6:18 PM
> To: 'R K Shyam Prakash'; vtkusers at vtk.org
> Subject: AW: [vtkusers] java.lang.UnsatisfiedLinkError: 
> VTKInit again and again
> 
> 
> Hello Shyam,
> 
> this ist he sample i use to test vtk:
> 
> import java.awt.*;
> import java.io.*;
> import java.awt.Image;
> import javax.vecmath.*;
> import vtk.*;
> 
> //Xith3D
> 
> 
> public class PBufferTest {
> 	
> 	// in the static contructor we load in the native code
> 	 // The libraries must be in your path to work
> 		// in the static contructor we load in the native code
> 	 // The libraries must be in your path to work
> 	 
> 	static{
> 	try{	
> 		System.loadLibrary("vtkCommonJava");
> 		System.loadLibrary("vtkFilteringJava");
> 		System.loadLibrary("vtkImagingJava");
> 		System.loadLibrary("vtkGraphicsJava");
> 		System.loadLibrary("vtkRenderingJava");		
> 		System.loadLibrary("vtkIOJava");
> 		System.loadLibrary("vtkHybridJava");
> 		System.loadLibrary("vtkParallelJava");
> 	}catch(Throwable e){
> 		System.out.println("Error in loading VTK libraries");
> 	}
> }
> 
> 	 
> 	// the main function
> 	 public static void main (String[] args)
> 	 {
> 		
> 
> 	   // create sphere geometry
> 	   vtkSphereSource sphere = new vtkSphereSource();
> 	   sphere.SetRadius(1.0);
> 	   sphere.SetThetaResolution(18);
> 	   sphere.SetPhiResolution(18);
> 
> 	   // map to graphics objects
> 	   vtkPolyDataMapper map = new vtkPolyDataMapper();
> 	   map.SetInput(sphere.GetOutput());
> 
> 	   // actor coordinates geometry, properties, transformation
> 	   vtkActor aSphere = new vtkActor();
> 	   aSphere.SetMapper(map);
> 	   aSphere.GetProperty().SetColor(0,0,1); // color blue
> 
> 	   // a renderer for the data
> 	   vtkRenderer ren1 = new vtkRenderer();
> 	   ren1.AddActor(aSphere);
> 	   ren1.SetBackground(1,1,1); // background color white
>  
> 	   // a render window to display the contents
> 	   vtkRenderWindow renWin = new vtkRenderWindow();
> 	   renWin.AddRenderer(ren1);
> 	   renWin.SetSize(300,300);
> 
> 	   // an interactor to allow control of the objects
> 	   vtkRenderWindowInteractor iren = new 
> vtkRenderWindowInteractor();
> 	   iren.SetRenderWindow(renWin);
> 
> 	   // trigger the rendering and start the interaction
> 	   renWin.Render();
> 	   iren.Start();
> 	 } 
> }
> 
> Thats what i used. As i said, the librariess are found, as 
> supposed to. I also can acsess the vtk.jar. I originally 
> tried the latest binary download from the vtk website.
> 
> Hope that helps any further,
> Chris
> 
>  
> 




More information about the vtkusers mailing list