<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
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.
<br>static {
<br> System.loadLibrary("vtkJava");
<br>}
<p>Philip Cook wrote:
<blockquote TYPE=CITE>I am attempting to use vtkSphereSource in Java. I
have found that I
<br>am forced to creat a vtkPanel object before vtkSphereSource will
<br>work.
<p>This code works fine:
<p> vtkPanel renPanel = new vtkPanel();
<br> vtkSphereSource sphere = new vtkSphereSource();
<p>But this code:
<p> vtkSphereSource sphere = new vtkSphereSource();
<br> vtkPanel renPanel = new vtkPanel();
<p>gives the following run time error:
<p>Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit
<br> at vtk.vtkSphereSource.VTKInit(Native
Method)
<br> at vtk.vtkObject.<init>(vtkObject.java:97)
<br> at vtk.vtkProcessObject.<init>(vtkProcessObject.java:78)
<br> at vtk.vtkSource.<init>(vtkSource.java:82)
<br> at vtk.vtkPolyDataSource.<init>(vtkPolyDataSource.java:30)
<br> at vtk.vtkSphereSource.<init>(vtkSphereSource.java:86)
<br> at SphFuncGlyph.<init>(SphFuncGlyph.java:28)
<p>[ Line 28 of SphFuncGlyph.java is the line vtkSphereSource sphere
<br>= new vtkSphereSource(); ]
<p>Why does the vtkPanel matter? How can I create vtk objects
<br>without having to make a vtkPanel?
<p>Thanks,
<p>Phil Cook
<p>_______________________________________________
<br>This is the private VTK discussion list.
<br>Please keep messages on-topic. Check the FAQ at: <<a href="http://public.kitware.com/cgi-bin/vtkfaq">http://public.kitware.com/cgi-bin/vtkfaq</a>>
<br>Follow this link to subscribe/unsubscribe:
<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a></blockquote>
<pre>--
J.A. Lee
Software Engineer
Computational Dynamics North America
3 Schoolhouse Lane
Etna NH, 03750
ph: 603-643-9993 x109, fax: 603-643-9994</pre>
</html>