[vtkusers] A step forward and stuck again: VTK, Mac OS, Java, SOLVED! partially

Mike Jackson imikejackson at gmail.com
Tue Feb 20 08:41:36 EST 2007



On Feb 20, 2007, at 8:28 AM, Bernard Giroux wrote:

> Kustaa Nyholm a écrit :
>>>>> Bernard Giroux <giroux at geo.polymtl.ca> 19.2.2007 17:07 >>>
>>> Does DYLD_LIBRARY_PATH contains the directory where *jnilib and  
>>> *dylib
>> are?
>> Ah, great suggestion, this cured the problem!
>> BTW isn't there something wrong if I need that? Knowing nothing about
>> this (I assume it
>> is some python stuff) I googled about a bit on this and someone said
>> that
>> it should not be necessary to set this if everything is configured
>> properly, what ever
>> that means...
>
> You built shared libraries, and DYLD_LIBRARY_PATH is the OSX way to  
> tell your apps where the libraries are.  Besides, if you select  
> VTK_USE_RPATH in your cmake config, then you don't have to define  
> DYLD_LIBRARY_PATH.

I believe the preferred way of "installing" jni libs or any native  
lib that Java is going to use is to copy those libraries into / 
Library/Java/Extensions. OS X AUTOMATICALLY looks in this directory  
for JNI libraries and other libraries. To do this you would have to  
set the RPATH to OFF when you build VTK. Then you have two choices.
Copy ALL libraries into /Library/Java/Extensions or copy the JNI  
libraries into that folder and the other libraries into /usr/local/ 
lib, which is another standard place that OS X automatically looks  
for libraries.
The should be no need to set the DYLD_LIBRARY_PATH on OS X if you  
stick with the places that Apple automatically looks in.



--
Mike Jackson
imikejackson & gmail * com





More information about the vtkusers mailing list