[vtkusers] java.lang.UnsatisfiedLinkError: VTKInit

Jeff Lee jeff at cdnorthamerica.com
Wed Jun 20 11:55:00 EDT 2001


Because vtkPanel does a static library load of libvtkJava.so - if you want it to work without
vtkPanel, just add a static block in your code i.e.
static  {
     System.loadLibrary("vtkJava");
}

Philip Cook wrote:

> I am attempting to use vtkSphereSource in Java. I have found that I
> am forced to creat a vtkPanel object before vtkSphereSource will
> work.
>
> This code works fine:
>
>   vtkPanel renPanel = new vtkPanel();
>   vtkSphereSource sphere = new vtkSphereSource();
>
> But this code:
>
>   vtkSphereSource sphere = new vtkSphereSource();
>   vtkPanel renPanel = new vtkPanel();
>
> gives the following run time error:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit
>         at vtk.vtkSphereSource.VTKInit(Native Method)
>         at vtk.vtkObject.<init>(vtkObject.java:97)
>         at vtk.vtkProcessObject.<init>(vtkProcessObject.java:78)
>         at vtk.vtkSource.<init>(vtkSource.java:82)
>         at vtk.vtkPolyDataSource.<init>(vtkPolyDataSource.java:30)
>         at vtk.vtkSphereSource.<init>(vtkSphereSource.java:86)
>         at SphFuncGlyph.<init>(SphFuncGlyph.java:28)
>
> [ Line 28 of SphFuncGlyph.java is the line vtkSphereSource sphere
> = new vtkSphereSource(); ]
>
> Why does the vtkPanel matter? How can I create vtk objects
> without having to make a vtkPanel?
>
> Thanks,
>
> Phil Cook
>
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers

--
J.A. Lee
Software Engineer
Computational Dynamics North America
3 Schoolhouse Lane
Etna NH, 03750
ph: 603-643-9993 x109, fax: 603-643-9994


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010620/f5f2ba13/attachment.htm>


More information about the vtkusers mailing list