gcj executable size reduction?

Per Bothner per@bothner.com
Wed May 5 05:15:00 GMT 2004


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/



More information about the Java mailing list