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

Carlos Martinez cmarbur at iti.upv.es
Fri Dec 5 03:47:57 EST 2003


Hi.

Sometimes I have got this exception. My problem was that the compilation 
version of libvtk*.so libraries wasn't the same as vtk.jar version. I mean 
that vtk.jar and libvtk*.so must pertain to the same build process. I 
don't know if this is a restriction, but I think that .java files 
generated have method signatures with numbers, that are not the same in 
all build processes.

You could erase the vtk.jar file (make a backup because I'm not sure) and
rebuild VTK. I think that the .class and .jar files will be compiled 
again. Then use this vtk.jar instead the older. Of course, you must set 
the CLASSPATH and LD_LIBRARY_PATH environment variables.

Tell us if this solves your problem.

Bye.

On Thu, 4 Dec 2003, Fran Fabrizio wrote:

> 
> No change from what I sent yesterday and first email today - here it is though:
> 
>  > [fran at freeman Java]# java Cone
>  > Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit
>  > at vtk.vtkConeSource.VTKInit(Native Method)
>  > at vtk.vtkObject.<init>(vtkObject.java:98)
>  > at vtk.vtkProcessObject.<init>(vtkProcessObject.java:86)
>  > at vtk.vtkSource.<init>(vtkSource.java:86)
>  > at vtk.vtkPolyDataSource.<init>(vtkPolyDataSource.java:30)
>  > at vtk.vtkConeSource.<init>(vtkConeSource.java:114)
>  > at Cone.main(Cone.java:33)
>  > [fran at freeman Java]#
>  >
>  > I have made sure that vtk.jar is in the classpath (by dropping it into
>  > my ext directory). I have export LD_LIBARY_PATH=/usr/local/lib/vtk/ so
>  > it can find the libraries. I have googled on this error without any
>  > luck. Does anyone know what I could try next?
> 
> Thanks,
> Fran
> 
> At 05:34 PM 12/4/2003 -0800, you wrote:
> >Hi Fran:
> >
> >         Can you email me the command line you are using along with the 
> > entire
> >error message?  I'd like to take another look.
> >
> >Mona
> >
> >==================================================================
> >Mona Wong-Barnum
> >National Center for Microscopy and Imaging Research
> >University of California, San Diego
> >http://ncmir.ucsd.edu/
> >
> >"Circumstances don't make a man, they reveal him"
> >                         -- James Allen
> >==================================================================
> 

-- 
----------------------------------------------------------------------
Carlos Martínez Burgos      |     Instituto Tecnológico de Informática
Ingeniero Informático       |      Universidad Politécnica de Valencia
Tlf: +34 963877237          |                        Camí de Vera, S/N
cmarbur at iti.upv.es          |                   46071 Valencia - Spain
www.iti.upv.es/~cmarbur     |                           www.iti.upv.es
----------------------------------------------------------------------




More information about the vtkusers mailing list