[vtkusers] VTK Java implementation

Steve M. Robbins steven.robbins at videotron.ca
Mon Nov 28 13:42:01 EST 2005


On Mon, Nov 28, 2005 at 11:15:37AM -0500, don.casteel wrote:
> 
> I'm still having trouble getting VTK to work under java.
> I'm pretty sure I've got the path and classpath both setup correctly

But you haven't got the path set correctly, or there would be no
error.  You need to do first locate the directory containing all the
VTK DLLs; suppose it is C:\vtk.  Then you need to do one of two things; either:

(1) set the PATH variable (LD_LIBRARY_PATH on unix) to contain C:\vtk; or
(2) supply -Djava.library.path=C:\vtk argument on the java command line



> Java is looking for the vtk classes in
> 
> C:/martink/vtk42/vtkdist/java/vtk/
> 
> Which isn't where they are at, but I can't figure out what is pointing
> it there.

[...]
 
> The Cone.java example and my project file both compile without errors.
> However...  when I try to run either class I get the following error
> 
> ----------------------------------
> 
> C:\j2sdk1.4.2_06\My Java\My_3D\Flames3D>java Cone
> 
> Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit
> 
>         at vtk.vtkConeSource.VTKInit(Native Method)
> 
>         at
> vtk.vtkObject.<init>(C:/martink/vtk42/vtkdist/java/vtk/vtkObject.java:98
> )


You're misinterpreting this output.  It simply is telling you what
source line the error occurred at and the source *.java files happened
to be built from C:/martink/...

-Steve




More information about the vtkusers mailing list