This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building gcj on OS X (also AWT)


On May 24, 2004, at 8:23 AM, Michael Purdy wrote:

John, et. al.

This is a great thread!

How do we go about using gcj to compile whole existing .jar files?

gcj somejar.jar --main=some.class.in.Jar -o myapp


or perhaps:

gcj -shared somejar.jar -o libsomejar.so

Also, does anyone know of a resource which further explains the linking
process and how to link many files at once.

Use "-l" to link a binary that has some dependency on a shared library. For example, if you already have the libsomejar.so above:


gcj Main.java --main=Main -o myapp -lsomejar

To run it:

export LD_LIBRARY_PATH=.
./myapp

It would be cool if this kind of thing were documented in the gcj manual. Patches welcome, as always.

Regards

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]