[vtkusers] using VTK4.0 with Python and Java

Joshua Foster joshuaf at vnet.net
Fri Feb 8 21:35:34 EST 2002


Where can I find a compete set of instructions for making VTK work with Java and Python on a Windows machine?  I have installed the vtkcore, vtkjava and vtkpython binaries, but have not gotten anything to work yet.  I can't find any documentation about what paths to change, what libraries to link, etc except for tidbits of information I have found in the mailing list.

Regarding Java:
I have set my classpath to include vtk.jar, and I loaded all the libraries I can think of in a static constructor.  However, when I create a vtkRenederWindow, I get the VTKInit unsatisfied link error.  Here is my code:

import vtk.*;

public class test
{
  static {
    System.loadLibrary("vtkCommonJava");
    System.loadLibrary("vtkFilteringJava");
    System.loadLibrary("vtkIOJava");
    System.loadLibrary("vtkImagingJava");
    System.loadLibrary("vtkGraphicsJava");
  }

  public static void main( String[] args )
  {
    vtkRenderWindow renwin = new vtkRenderWindow();
    renwin.Render();
  }
}

and here is the error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit
        at vtk.vtkRenderWindow.VTKInit(Native Method)
        at vtk.vtkObject.<init>(vtkObject.java:97)
        at vtk.vtkWindow.<init>(vtkWindow.java:146)
        at vtk.vtkRenderWindow.<init>(vtkRenderWindow.java:350)
        at test.main(test.java:18)

Regarding Python:
I went in the registry and set my PythonPath to include both VTK\Wrapping\Python and VTK\bin.  However, neither one of these work as I still cannot import a single module/library in Python.  I have seen all kinds of things about copying your .dll's to multiple locations, renaming vtkpython.py to __init__.py, etc.  Is there anything that will actually work?

Thanks,
  Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020208/d7ff8ee1/attachment.htm>


More information about the vtkusers mailing list