This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: jni test case question/ linking


Ranjit Mathew wrote:
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.

Thanks for the quick hint. I have to dig into ltdl.c. Simply changing the shared suffix didn't help :)

But first I have to find out how to make my gcc libs shared.

Andreas



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]