[vtkusers] java.lang.UnsatisfiedLinkError: VTKInit
Matthew O'Brien
matthew_obrien at ndsu.nodak.edu
Wed Jun 20 12:03:56 EDT 2001
Try putting this line in before you create your new vtkSphereSource.
static{System.loadLibrary("vtkJava");}
In order to get the java libraries pulled in, you have to have this line in
your code. vtkPanel has this line in it. When you create a new vtkPanel
before the sphere source, it gets the libraries. Without this line, it can't
find what it needs.
Hope this helps.
Matt
-----Original Message-----
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
More information about the vtkusers
mailing list