Static linking with JNI-Libs possible?

Tom Tromey
Wed Apr 16 12:27:00 GMT 2003

>>>>> "Ranjit" == Ranjit Mathew <> writes:

Ranjit> Yes, Erik has done this before. IIRC, he compiled SWT into a 
Ranjit> static library, omitting the calls to System.loadLibrary( ...)

I think this should be possible without changing the sources to omit
loadLibrary calls, by using the libltd preload feature.

You might need a custom main(), or perhaps some init function called
pretty early.

I've never tried this.  So maybe it doesn't work at all.
See "( interface" -- search for lt_dlpreload.


More information about the Java mailing list