[vtkusers] VTK 5.0 with Java Wrappings On OS X will not work
Vivek Dwivedi
vivekd at mail630.gsfc.nasa.gov
Mon Jun 26 10:28:12 EDT 2006
Hello:
After 3 weeks of frustration I have come to the conclusion that VTK
5.0 with Java Wrappings will not work on OS X 10.4.x. I will detail
my steps below so that hopefully someone will tell me my mistakes.
my current hardware configuration:
Dual 2 GHz PowerPC G5 - 2.5 GB DDR SDRAM
OS - Mac OS X 10.4.6
Java -
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)
VTK - Downloaded from vtk.org version 5.0.0
CMAKE- CMake Version 2.4 - patch 2
Downloaded VTK as a .tar.gz and expanded to /Users/vivekd creating a
VTK folder
cd to VTK folder typed ccmake ../vtk
Here is the CCMAKE options:
BUILD_EXAMPLES ON
BUILD_SHARED_LIBS ON
CMAKE_BACKWARDS_COMPATIBILITY 2.4
CMAKE_BUILD_TYPE
CMAKE_INSTALL_PREFIX /usr/local
CMAKE_OSX_ARCHITECTURES ppc
CMAKE_OSX_SYSROOT /Developer/SDKs/
MacOSX10.4u.sdk
VTK_DATA_ROOT
VTK_DATA_ROOT-NOTFOUND
VTK_USE_CARBON OFF
VTK_USE_COCOA OFF
VTK_USE_PARALLEL OFF
VTK_USE_RENDERING ON
VTK_USE_RPATH OFF
VTK_USE_X ON
VTK_WRAP_JAVA ON
VTK_WRAP_PYTHON OFF
VTK_WRAP_TCL OFF
I configured
I then toggled to advanced mode and changed the following Paths:
JAVACOMMAND /System/Library/Frameworks/
JavaVM.framework/Versions/1.5/Commands/java
JAVA_ARCHIVE /System/Library/Frameworks/
JavaVM.framework/Versions/1.5/Commands/jar
JAVA_AWT_INCLUDE_PATH /System/Library/Frameworks/
JavaVM.framework/Versions/1.5/Headers
JAVA_AWT_LIBRARY -framework JavaVM -framework
JavaEmbedding
JAVA_COMPILE /System/Library/Frameworks/
JavaVM.framework/Versions/1.5/Commands/javac
JAVA_INCLUDE_PATH /System/Library/Frameworks/
JavaVM.framework/Versions/1.5/Headers
JAVA_INCLUDE_PATH2 /System/Library/Frameworks/
JavaVM.framework/Versions/1.5/Headers
JAVA_RUNTIME /System/Library/Frameworks/
JavaVM.framework/Versions/1.5/Commands/java
OPENGL_INCLUDE_DIR /usr/X11R6/include
OPENGL_gl_LIBRARY -framework OpenGL
OPENGL_glu_LIBRARY -framework AGL
Configured again and pressed g
In my prompt I typed Make
and after 45 min. everything compiles fine with no errors.
I changed my DYLD_LIBRARY_PATH to point to the location of
the .jnilib and .dylib files which are in my bin directory located
at /Users/vivekd/VTK/bin using the following command
setenv DYLD_LIBRARY_PATH /Users/vivekd/VTK/bin
I then set my CLASSPATH to point to the vtk.jar file with the
following commands
setenv CLASSPATH .:/Users/vivekd/VTK/bin/vtk.jar
I then CD to /Examples/Tutorial/Step2/Java
I compiled the Cone2.java as follows:
javac Cone2.java
I then try to run Cone2.java as follows:
java Cone2
I get the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit
at vtk.vtkConeSource.VTKInit(Native Method)
at vtk.vtkObject.<init>(vtkObject.java:90)
at vtk.vtkAlgorithm.<init>(vtkAlgorithm.java:238)
at vtk.vtkPolyDataAlgorithm.<init>(vtkPolyDataAlgorithm.java:
58)
at vtk.vtkConeSource.<init>(vtkConeSource.java:114)
at Cone2.main(Cone2.java:43)
I have build and rebuilt VTK...I have placed the Cone2.java example
in the bin directory and compiled but I still get the same error......
Has anyone been able to get vtk with java wrappings to work on a
mac.........
Any help and all help will be greatly appreciated.......
Thank you
-Vivek
More information about the vtkusers
mailing list