[Gvsig_english] Re: OS X build & native libraries - dylib, jnilib, ...

Mija hoanqui at ono.com
Wed Apr 5 16:03:49 CEST 2006


>>  I would be happy to
>> have a couple of precisions about the way gvSig is built:
>> it is released with a bunch of .so files or .dll files (gdal...) and
>> some classes that seem to be JNI interfaces. In order to build my OSX
>> version, how can I proceed? simply find the .dylib files and copy  
>> them
>> into the binaires/osx or do I have to modify any JNI binding ?

If you only want to build the app, you can do so by following the  
readme instructions: execute the 4 build.xml files and you'll have a  
working gvSIG.
That's the way I'm working, since (up to now) I'm mainly interested  
in the pure java part of the app.

If you want / need some functionality that is only available thru  
native libraries, you'll have to find/build them for OS X, and make  
them available to the JVM.
First off: are you sure you need native libraries? Some mixed java /  
native libraries, like JAI Image I/O, will fall back to pure java  
code if the native libraries are not found - though looks like some  
features won't work in that case, like JPEG2000.
If you do need / want the native libraries, find/build them. They  
will surely be called lib*.jnilib, though the typical name for  
libraries in OS X would be *.dylib.

This link could prove useful:
http://developer.apple.com/documentation/Java/Conceptual/ 
Java14Development/index.html

And then you'll have to make the libraries available to the JVM. I  
think that there are a number of ways of doing so: the - 
Djava.library.path= switch to the JVM, the DYLD_LIBRARY_PATH  
environment variable, and the various Extensions directories (machine- 
global in /Library/Java/Extensions and user-local in ~/Library/Java/ 
Extensions).
I'm not really into JNI, so I can't tell you if all these methods  
work, if one is better than the other, or even if various are needed  
simultaneously (though I don't think so).

Good luck!



More information about the Gvsig_internacional mailing list