Re: [fedora-java] New Eclipse RPMs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2005-03-01 at 16:08 +0100, Peter Backlund wrote:
> I'd like to know why gij is needed at all, when Eclipse is (supposedly)
> compiled into a native binary?

gij is just a tiny program that loads the requested class and invokes its
main() method. It doesn't have any additional interpreter code above and 
beyond what's already in libgcj.so.

There are a couple of approaches you can take to building a native 
executable with gcj.

[1] Link your program together using "gcj --main=foo.bar.MainClass".
    This pretty much mirrors the C or C++ way of thinking.  You end
    up with an executable whose "main()" is foo.bar.MainClass.main().

[2] Build your classes into .so files and load them on demand.  This is
    what we're doing for Eclipse and (hopefully) all of the java
    programs in Eclipse.  We use the tiny "gij" program to kick things 
    off.

It turns out that it's much simpler to get existing java programs to run 
using this second approach.  For one thing, you can use all of the existing
wrapper shell scripts and programs (/usr/bin/eclipse, /usr/bin/ant, etc) 
instead of having to create/link a new main executable.  There are no
real downsides to this approach either.

AG




[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux