<!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&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp; vtkPanel renPanel = new vtkPanel();
<br>&nbsp; vtkSphereSource sphere = new vtkSphereSource();
<p>But this code:
<p>&nbsp; vtkSphereSource sphere = new vtkSphereSource();
<br>&nbsp; vtkPanel renPanel = new vtkPanel();
<p>gives the following run time error:
<p>Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at vtk.vtkSphereSource.VTKInit(Native
Method)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at vtk.vtkObject.&lt;init>(vtkObject.java:97)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at vtk.vtkProcessObject.&lt;init>(vtkProcessObject.java:78)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at vtk.vtkSource.&lt;init>(vtkSource.java:82)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at vtk.vtkPolyDataSource.&lt;init>(vtkPolyDataSource.java:30)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at vtk.vtkSphereSource.&lt;init>(vtkSphereSource.java:86)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at SphFuncGlyph.&lt;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: &lt;<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>--&nbsp;
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>
&nbsp;</html>