<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>Problems with vtkCanvas and vtkRenderingJava.dll</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hello all,</FONT>
</P>

<P><FONT SIZE=2>I am currently evaluating use of VTK in a research group but have encountered a problem running any VTK code under Java 1.4. First, I have only installed the Windows binaries on my Window 2000 workstation and have not yet attemped rebuilding them from source code. The following steps were completed:</FONT></P>

<P><FONT SIZE=2>1) Added vtk.jar to the CLASSPATH and vtk/bin to the search path.</FONT>
</P>

<P><FONT SIZE=2>2) Added vtkPanel, vtkSettings and vtkTesting to the vtk.jar. These were obtained from the repository for VTK4.23.</FONT>
</P>

<P><FONT SIZE=2>3) Attempted to compile vtkCanvas so that I could add it to the jar file but received the following compile error:</FONT>
</P>

<P><FONT SIZE=2>C:\temp\VTKTest\src\vtkCanvas.java:7: cannot resolve symbol</FONT>
<BR><FONT SIZE=2>symbol&nbsp; : class vtkPanel</FONT>
<BR><FONT SIZE=2>location: class vtk.vtkCanvas</FONT>
<BR><FONT SIZE=2>public class vtkCanvas extends vtkPanel implements MouseListener, MouseMotionListener, KeyListener</FONT>
</P>

<P><FONT SIZE=2>3) Undaunted, I proceeded to compile sucessfully the SimpleVTK program, but when I attempted to run it I received the following run-time error:</FONT></P>

<P><FONT SIZE=2>Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: C:\Program Files\vtk4</FONT>
<BR><FONT SIZE=2>2\bin\vtkRenderingJava.dll: Can't find dependent libraries</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.ClassLoader$NativeLibrary.load(Native Method)</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473)</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397)</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.Runtime.loadLibrary0(Runtime.java:788)</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.System.loadLibrary(System.java:832)</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at vtkPanel.&lt;clinit&gt;(vtkPanel.java:27)</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at SimpleVTK.&lt;init&gt;(SimpleVTK.java:19)</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at SimpleVTK.main(SimpleVTK.java:49)</FONT>
</P>

<P><FONT SIZE=2>This error is listed in the archives but have found no indication of how to fix it.</FONT>
</P>

<P><FONT SIZE=2>Suggestions what to try next? Do I have to download the VTK source and rebuild it?</FONT>
</P>

<P><FONT SIZE=2>David MacKinnon</FONT>
<BR><FONT SIZE=2>PhD Student, Department of Systems and Computer Engineering</FONT>
<BR><FONT SIZE=2>Carleton University, Ottawa, Canada</FONT>
</P>

</BODY>
</HTML>