[vtkusers] VTK with Java on OS X just not working
Timothy Driscoll
molvisions at mac.com
Mon Apr 28 16:15:57 EDT 2008
hi,
apologies for sending another inquiry about this issue, but I'm quite
frustrated trying to run VTK with Java wrappings under OS X
(10.4.11). I've been able to get the VTK-Examples to run just fine,
by setting the build.properties thusly:
vtk.src.path = /local/vtk/vtk-build/bin
vtk.classpath = /local/vtk/vtk-build/bin/vtk.jar
but in my own, very simple Java app, when I do this:
static {
System.loadLibrary("vtkCommonJava");
System.loadLibrary("vtkFilteringJava");
System.loadLibrary("vtkIOJava");
System.loadLibrary("vtkImagingJava");
System.loadLibrary("vtkGraphicsJava");
System.loadLibrary("vtkRenderingJava");
}
I continue to see this run-time error:
Exception in thread "AWT-EventQueue-0"
java.lang.UnsatisfiedLinkError: /local/vtk/VTK-build/bin/
libvtkCommonJava.5.1.0.dylib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
/local/vtk/VTK-build/bin/libvtkCommonJava.5.1.0.dylib exists. I have
set:
-Djava.library.path=.:/local/vtk/vtk-build/bin
-Dclasspath .:/local/vtk/vtk-build/bin/vtk.jar
I really can't understand why this doesn't work. the dylibs are all
in the bin directory. I've tried changing the extensions to jnilib,
and moving them to /Library/java/Extensions, and setting all sorts of
environment variables, and nothing has any effect on the error. I've
recompiled VTK from the CVS head. I compiled it without the 'R_PATH'
option, which as I understand tells cmake not to embed the paths in
the files.
my simple app works just fine on linux, which makes it even more
annoying. ;-)
can someone please help? I'd really like to write actual code that
uses VTK, but I've been stuck trying to point it at the dylibs for
over a month and I'm about at the end of rope. I think I know just
enough about java and vtk to be dangerous to myself.
thanks for any help,
tim
--
earth:usa:virginia:blacksburg
I am behindtherabbit:
del.icio.us | last.fm | mojo | twitter | www
More information about the vtkusers
mailing list