[vtkusers] java.lang.UnsatisfiedLinkError: VTKInit again and again
R K Shyam Prakash
ramakrishna.prakash at quest-global.com
Mon May 10 10:16:14 EDT 2004
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