Troubleshooting - Mac OSX
Troubleshooting - Mac OSX
1.A tutorial on the usage of CMake to install VTK on Mac is available here: http://www.vtk.org/Wiki/Cocoa_VTK#Installing_VTK_on_Mac_OS_X_10.4.x_for_the_purposes_of_Cocoa
2.I'm having problems to run a program using the VTK libraries on my Mac OS 10.5. I'm using Eclipse and the programs compile fine, but when I run them it gives me the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no vtkCommonJava in java.library.path
I have included the vtk.jar and I created the PATH variable indicating the path to the .dylib files. I
don't know what else to try. Has anyone had this problem?
•You need to update the configuration files generated by eclipse for your project. I never used vtk/java on Mac before but I had a similar exception related to java.library.path in the past. The PATH variable created outside eclipse has no effect on your project.
•At first I thought maybe you could try to use LD_LIBRARY_PATH to point to your VTK/bin directory.
But it seem if you want to work with Java, you may have to use Java Runtime on Mac OS X to access such dynamic libraries. You may want to look at this for more detail
i.Ld library path is for includig .lib or .so or .o (or similar) libraries. you woudl want to set CLASSPATH if you want to include jar files. You need to set PATH if you want to access binaries or run shell scripts that would invoke/run programs. From what exception you are talking, I am guessing you are talking about CLASSPATH?
1.Yes, I had set the classpath to include the jar. The problem was that it wasn't recognizing the .dylib files. Then I set the DYLD_LIBRARY_PATH and that made it work.
Information provided by Peter Kristof (pkristof@purdue.edu)