input line is too long

Tom Tromey tromey@redhat.com
Mon Dec 30 23:24:00 GMT 2002


>>>>> "Erik" == Erik Poupaert <erik.poupaert@chello.be> writes:

Erik> I've been trying to link a SWT helloworld application with a
Erik> .lib version of the jni stuff in SWT (swt-win32-XXXX.lib). I'd
Erik> like to get rid of this separate jni-dll.

This is possible in theory, but in practice I don't know that anybody
has tried it and reported back.

The basic idea is to make a single library and either rely on libltdl
to find the symbols there.  In this scenario you'd still need to
comment out the loadLibrary() calls.

Erik> Therefore, I disabled the loadLibrary() call in SWT's
Erik> Library.java. I've tried to recompile the jni stuff with a
Erik> modified jni_md.h. To no avail.  Maybe the -fjni option requires
Erik> the jni stuff to sit in a separate dll? Does anybody know what
Erik> steps to take?

See natRuntime.cc:_Jv_FindSymbolInExecutable to see exactly how
symbols are found at runtime.  Basically we iterate over all known
libraries and ask libltdl about them.

Tom



More information about the Java mailing list