[vtkusers] vtk4.0 + Java: UnsatisfiedLinkError: VTKInit solved
Peter J. Carr
pjc at hootenanny.org
Wed Jan 23 19:05:28 EST 2002
I had problems running Regression.java. The problem has to do with how
the vtk java classes are found by the class loader. In all cases I
created a jar file (vtk.jar) containing all of the automatically
generated java classes. This does not include vtkPanel. When I ran
Regression as such:
java -classpath .:vtk.jar Regression
I encountered no error.
When I moved vtk4.0.jar from my local directory to
/usr/local/java/jre/lib/ext/vtk4.0.jar (part of my java installation
directory) and then ran Regression as such:
java Regression
I get no error loading the shared libraries, but I get the following
error the first time I use one of the vtk java classes.
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:166)
at vtk.vtkRenderWindow.<init>(vtkRenderWindow.java:358)
at Regression.main(Regression.java:30)
I will have to read a bit more about java class loading to understand
why one way works and the other way doesn't.
- Peter Carr
More information about the vtkusers
mailing list