JNI with windows/ statically linkning

Tom Tromey tromey@redhat.com
Wed Oct 9 16:41:00 GMT 2002

>>>>> "Clemens" == Clemens Eisserer <linuxhippy@web.de> writes:

Clemens> 1.) Is it possible to use GCJ with Windows and what is the
Clemens> actual build for windows? Is it still not possible to use JNI
Clemens> with windows? Where can I find some binaries for Windows (I
Clemens> hat compiling under Windows)?

I don't know of any prebuilt gcj for Windows.

The Windows port should compile and work, but there are missing
features.  Adam Megacz usually has the best information on this.
Adam, maybe you could submit PRs for the known-missing things (I
recall Process and something to do with condition variables ...?).

Clemens> 2.)I want to link statically against all libs needed for running my 
Clemens> compilied java-app. But if I  link with "-static" it only link libgcj 
Clemens> in, but I also need libgcc etc.
Clemens> Is it possible to include really all needed libs?

I think on Windows you are forced to link statically right now.
(Another PR ...)

It ought to link in libgcc for you by default, via the magic of
libgcj.spec.  If it doesn't, then that sounds like a bug.

Clemens> 3.) If I link something to libgcj statically, it requires
Clemens> realy a lot of size. But most Funktions I really doesnt need
Clemens> everytime linked in.  (Linke Networt, AWT,.....), because I
Clemens> wont use them ever. Is it possibel to include only the really
Clemens> needed classes. I´ve tried "strip --strip-all" but the
Clemens> executable only linked to libgcj and libggc is still 2megs
Clemens> bit (with 3.0.4).

Search the archives for stuff about this.  Basically, it is a
well-known problem for which no one has yet implemented a fix, though
plausible fixes have been proposed.

Clemens> 4.) Is it woth upgrading to 3.2?

Of course it depends on your application.  But for gcj the general
rule is that every release has more libraries and bug fixes than the
previous release.


More information about the Java mailing list