[vtkusers] Mac OS X, Java guru needed, please.

David E DeMarle dave.demarle at kitware.com
Tue Jan 16 18:11:37 EST 2007


It's likely that your CLASSPATH or LD_LIBRARY_PATH (or whatever the
Mac uses to say where shared libs are) is missing the jre's awt lib.
How to set that on a Mac I do not know. I vaguely remembering having a
similar error on my Debian Linux machine. My build process on that
machine is:


checkout vtk into /home/demarle/Kitware/VTK/devel/VTK

mkdir buildJava
cd buildJava

setenv LD_LIBRARY_PATH
${LD_LIBRARY_PATH}:/home/demarle/Kitware/VTK/devel/buildJava/bin/:/usr/local/java/jdk1.5.0_08/jre/lib/i386/xawt/
setenv CLASSPATH
/home/demarle/Kitware/VTK/devel/buildJava/bin/:/home/demarle/Kitware/VTK/devel/buildJava/java/:.

ccmake ../VTK
set VTK_WRAP_JAVA
I also set these two because it makes successive builds faster (not
sure if you need them or not)
set BUILD_SHARED_LIBS ON
set VTK_USE_RPATH ON
generate
make

cd ..
mkdir TestProg
cd TestProg
cp ../VTK/Examples/Tutorial/Step1/Java/Cone.java .
javac Cone.java
java Cone

hth,
Dave DeMarle



More information about the vtkusers mailing list