[vtkusers] Java wrapper bug on MacOSX

Carlos Martínez Burgos cmarbur at iti.upv.es
Thu Sep 5 11:51:04 EDT 2002


Hi all.

I've compiled VTK on MacOSX without problems, adding lines from 
"http://public.kitware.com/pipermail/vtkusers/2002-July/012437.html" post.

Now, I'm trying to run an example from "Wrapping/Java" directory. First, I
compile vtkCanvas.java and vtkPanel.java. Then, I compile the example
SimpleVTK.java, setting the CLASSPATH to ".:$VTKHOME/bin/vtk.jar". 
Everything is OK.

I set the DYLD_LIBRARY_PATH to "$VTKHOME/bin" and try to run the program
and I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no 
vtkCommonJava in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
	at java.lang.Runtime.loadLibrary0(Runtime.java:749)
	at java.lang.System.loadLibrary(System.java:820)
	at vtk.vtkPanel.<clinit>(vtkPanel.java:25)
	at SimpleVTK.<init>(SimpleVTK.java:19)
	at SimpleVTK.main(SimpleVTK.java:49)

I look for the libraries at $VTKHOME/bin and see two libraries for
vtkCommonJava with extensions .dylib and .jnilib. The one with extension
.jnilib is a symbolic link to the other, but the link is wrong because
points to one with the extension .dynlib. I correct this and try again.

Then I get the same error but because of vtkFilteringJava library. I
suppose that this is because there's no links (.jnilib extension) to the
other libraries. I create them and try again. Then the program runs but no 
window is displayed and it crashes with a "Bus error" message.

I think that the problem is in the porting of vtkPanel, because the
Regresion.java program and the Cone.java example from the tutorial and
everything is OK. How could I solve this problem? Has somebody solved it?

The same "Bus error" message appears if I run TestInternalFrames.java, 
TestVTKCanvas.java and ImagePlaneWidget.java programs, that use vtkPanel 
or vtkCanvas.

I think that the problem only happens on the MacOSX compilation. Have 
anyone get the same problem on Windows or Linux?

Where could be the problem? What source files should I modify to correct 
it?

Thanks in advance.

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