[vtkusers] Using VTK w/ Java - Can't get past VtkInit error

William Lukman w_lukman at yahoo.com
Thu Mar 16 00:57:34 EST 2006


Hi Lars,

thanks for the information. I've tried everyone single
one of them and it's exactly the same. I tried on my
PC, it seems to be working because I forgot to put the
path to dll's file. However my computer keep crashing
whenever I tried to run the Cone.java. Then I tried to
do it on my Laptop, the problem is still giving me the
same error output (VTKInit)

> 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

It seems to be working fine since when I tried to
compile only with loadlibrary it's fine.
It gives me error when I try to runthis:

vtkSphereSource sphere = new vtkSphereSource();

Any idea ?


--- Lars Matthäus <lars.matthaeus at web.de> wrote:

> -----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-----
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the vtkusers mailing list