GCJ and dynamic linking

Jeff Sturm jsturm@one-point.com
Mon Sep 17 17:53:00 GMT 2001


On Mon, 17 Sep 2001, Dachuan Yu wrote:
> Does GCJ support dynamic linking?

On targets that support shared libraries, such as GNU/Linux, yes.

Use the `-shared' flag to create a shared library (just as you would for
the C/C++ compiler), e.g.

gcj -shared -fPIC Example.java -o Example.so
gcj Main.java Example.so --main=Main

Jeff



More information about the Java mailing list