This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj executable size reduction?
- From: Per Bothner <per at bothner dot com>
- To: Adam Megacz <adam at megacz dot com>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 04 May 2004 22:15:14 -0700
- Subject: Re: gcj executable size reduction?
- References: <407EABEF.7010208@bothner.com> <407EB605.3070402@avtrex.com> <407EB8C3.5060205@avtrex.com> <16510.47960.352311.839928@cuddles.cambridge.redhat.com> <4080310B.9030204@redhat.com> <m1smegpu0w.fsf@nowhere.com> <4097DF60.7090002@bothner.com> <m1fzafk7f3.fsf@nowhere.com>
Adam Megacz wrote:
plus a -lgij to enable compiling a static executable.
Hrm, I don't understand what this does. I just leave the interpreter
out altogether.
That's a way to pass -verbose:class (or any other gij) flag to a
compiled application. (You can also select which class's "main"
method you want to execute, set properties with -D flas, etc).
The application can be statically linked; it just uses gij.o
as the startup (C-level) main function, instead of having to
specify a class with a --main flag. I.e.
gcj -o Foo.exe Foo.java ... --main=Foo
./Foo.exe args ...
does the same as:
gcj -o Foo.exe Foo.java ... -lgij
./Foo.exe [options] Foo args ...
However, the latter allows you to specify [options] - for example
the new -verbose:class.
--
--Per Bothner
per@bothner.com http://per.bothner.com/