jni test case question/ linking
Ranjit Mathew
rmathew4lists@hotmail.com
Wed Feb 19 09:13:00 GMT 2003
>Does the call System.loadLibrary ("field"); assume that it is an .so
>file?
>>Or may I have some PATH settings to adjust?
>>I run this on darwin, where .so = .dylib.
>The point is, do I have to add the ability to load .dylib files in java?
See java::lang::Runtime::_load( ) in "java/lang/natRuntime.cc" - as
I understand it, you should define _Jv_platform_solib_prefix and
_Jv_platform_solib_suffix approrpriately ("" and ".dll" respectively
on Win32 (win32.h) and "lib" and ".so" respectively on POSIX (posix.h)).
See "libltdl/ltdl.c" for the code that actually loads a DLL/.so - if
these mechanisms suffice for a .dylib, I guess you're done.
Ranjit.
More information about the Java
mailing list