This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: jni test case question/ linking
- From: "Ranjit Mathew" <rmathew4lists at hotmail dot com>
- To: "Andreas Tobler" <toa at pop dot agri dot ch>,<java at gcc dot gnu dot org>
- Date: Wed, 19 Feb 2003 14:45:20 +0530
- Subject: Re: jni test case question/ linking
- References: <3E4318FE000016CE@mail02.agrinet.ch>
- Reply-to: "Ranjit Mathew" <rmathew at hotmail dot com>
>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.