JNI without dynamic linking?

Martin Kahlert martin.kahlert@infineon.com
Thu Apr 26 01:17:00 GMT 2001


Hi!
Is it possible to add native functions to java progs statically?
It works with 
System.loadLibrary("name");
in the java sources.
I deleted this and linked the files with the C functions statically.
This does not work (exception at load).
The difference seems to be that _Jv_FindSymbolInExecutable is called
twice, the name of the C function and additionally with its mangled
name. 
The second call is missing if i use the dynamic linked variant
by providing a libname.so.
The symbols seem to be searched for in all libraries and after that inside
the executable itself (by dlsym(NULL....)), so this should work.
Can anybody give me a hint, here?
Thanks,
Martin.
-- 
The early bird gets the worm. If you want something else for 
breakfast, get up later.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /