[vtkusers] VTK with Java and Xcode

Jim Dickson jdickson at sympatico.ca
Wed Sep 12 15:00:57 EDT 2007


Hello vtkusers,

Has anyone successfully used VTK with Java and Xcode on Mac OSX?  We are
using VTK 5.1 with Xcode 2.4.  We can checkout the software and compile
successfully using all of the suggestions already found on this mailing
list, but we run into difficulty when we start using the Xcode IDE.   
We can
successfully run all the examples (Cone1.java, Cone2.java, Cone3.java  
and
Cone4.java) from the command line in the terminal window using javac and
java.  The DYLD_LIBRARY_PATH environment variable is set and we point  
the
classpath to the location of the vtk.jar file.

However, when we change over to use Xcode with Java we get a linker  
error
that cannot find VTKInit.  I am assuming that Xcode cannot find the  
native
libraries (*.jni).  The vtk.jar file and the *.jnilib files are  
located in
/Library/Java/Extensions.  I have discovered that the DYLD_LIBRARY_PATH
environment variable is disabled in the latest versions of OSX due to a
security risk and wondered if that was part of the problem.  Do we  
need to
explicitly include the jnilibs?

Right now all we are trying to do is to compile and run the example  
programs
with Xcode and then move on to do some real application development.  If
anyone has some standard operating procedures, we would like to see  
them.

Thanks.




More information about the vtkusers mailing list