[vtkusers] Using VTK w/ Java - Can't get past VtkInit error
Lars Matthäus
lars.matthaeus at web.de
Wed Mar 15 03:20:44 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
1) Include the directory with the vtk dll's in your Path
2) Include the vtk.jar in your Java build path
3) Make sure you load the dll's on runtime, i.e. have a class (for me
it's vtkPanel.java) with the following lines before the constructor:
static {
System.loadLibrary("vtkCommonJava");
System.loadLibrary("vtkFilteringJava");
System.loadLibrary("vtkIOJava");
System.loadLibrary("vtkImagingJava");
System.loadLibrary("vtkGraphicsJava");
System.loadLibrary("vtkRenderingJava");
try {
System.loadLibrary("vtkHybridJava");
} catch (Throwable e) {
System.out.println("cannot load vtkHybridJava, skipping...");
}
try {
System.loadLibrary("vtkWidgetsJava");
} catch (Throwable e) {
System.out.println("cannot load vtkWidgetsJava, skipping...");
}
try {
System.loadLibrary("vtkVolumeRenderingJava");
} catch (Throwable e) {
System.out.println("cannot load vtkVolumeRendering,
skipping...");
}
try {
System.loadLibrary("vtkParallelJava");
} catch (Throwable e) {
System.out.println("cannot load vtkParallel, skipping...");
}
}
Hope that helps!
Lars
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
iD8DBQFEF85c4onYhDdEmLARA+avAJ0QiBwehfFqZ/rKO+VwQAPX9XUx+ACgi9R+
tq8VKjyJCJqj4zz5s5rd7+g=
=1WxF
-----END PGP SIGNATURE-----
More information about the vtkusers
mailing list