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

R K Shyam Prakash ramakrishna.prakash at quest-global.com
Mon May 10 07:34:13 EDT 2004


Chris,
	Since vtkSphereSource is part of Graphics package, I don't see
any reason for this error. Can you try your program with the following
static block and let me know if it works.

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");
	}
}

--Shyam

> -----Original Message-----
> From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] 
> On Behalf Of Christian
> Sent: Monday, May 10, 2004 4:43 PM
> To: vtkusers at vtk.org
> Subject: [vtkusers] java.lang.UnsatisfiedLinkError: VTKInit 
> again and again
> 
> 
> Hello vtkUsers,
> 
> I send this question, because i am totaly out of ideas on how 
> to get the vtk-binaries running und Windows XP. I already 
> searched the archive for all relating topics on this, but no 
> one seemed to found an solution to this problem.
> 
> First of all i installed the available vtk 4.2 binaries. Then 
> i createt a new project in my eclipse enviroment using one of 
> the javaexamples.
> 
> Now, the dll itself are alll found and loaded using the following:
> 
> static { 
> 	   System.loadLibrary("vtkCommonJava"); 
> 	   System.loadLibrary("vtkIOJava"); 
> 	   System.loadLibrary("vtkImagingJava"); 
> 	   System.loadLibrary("vtkGraphicsJava"); 
> 	   System.loadLibrary("vtkRenderingJava"); 
> 	 }
> 
> If i do not include the dlls i get the typicall
> java.lang.UnsatisfiedLinkError: no vtkCommonJava in 
> java.library.path Error-Messages.
> 
> So it looks like the dlls are all loaded when i include them 
> into my path. So far so good.
> 
> Now if i use only one command relating to vtk.jar like:
> 
> vtkSphereSource sphere = new vtkSphereSource();
> 
> everything crashes with the following Error:
> 
> java.lang.UnsatisfiedLinkError: VTKInit
> 	at vtk.vtkSphereSource.VTKInit(Native Method)
> 	at 
> vtk.vtkObject.<init>(C:/martink/vtk42/vtkdist/java/vtk/vtkObje
> ct.java:98
> )
> 	at 
> vtk.vtkProcessObject.<init>(C:/martink/vtk42/vtkdist/java/vtk/
> vtkProcess
> Object.java:86)
> 	at 
> vtk.vtkSource.<init>(C:/martink/vtk42/vtkdist/java/vtk/vtkSour
> ce.java:86
> )
> 	at 
> vtk.vtkPolyDataSource.<init>(C:/martink/vtk42/vtkdist/java/vtk
> /vtkPolyDa
> taSource.java:30)
> 	at 
> vtk.vtkSphereSource.<init>(C:/martink/vtk42/vtkdist/java/vtk/v
> tkSphereSo
> urce.java:158)
> 	at PBufferTest.main(PBufferTest.java:56)
> Exception in thread "main"
> 
> I tried almost everything, but it does not work!
> Also there is terribly few information on how to install 4.x 
> version of vtk on windows or how to work with java.
> 
> I am really looking forward to find some help among the 
> people who use vtk with java :-)
> 
> Many thanks in advance,
> Chris
> 
> 
> 
> 
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: 
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list