eclipse and gcj

Joerg Brunsmann
Tue Dec 3 08:22:00 GMT 2002

--- Tom Tromey <> wrote: 

> I think there are 3 ways to approach eclipse+gcj:
> * Compile Eclipse from source with gcj (I didn't try this at all)
> * Compile Eclipse from bytecode with gcj
> * Run Ecilpse bytecode using gij
> Compiling from bytecode seemed like a promising first step: we can
> avoid bugs in the gcj front end, and we don't have to touch Eclipse's
> build process (which until recently wasn't even available).

Can you provide a makefile or shell script for compiling all the 
eclipse jar files?

> We're missing some packages that parts of Eclipse need:
> (including,, javax.mail.  Ant,

Doesn't classpathX contain these packages?


> The result tried to start up, but failed.  As I recall the problems
> start because Eclipse relies on the ProtectionDomain for a class being
> set to something sensible; it uses the CodeSource in the domain to
> look for other files it needs at runtime.  Gcj-compiled native classes
> don't have this information set the way Eclipse expects, so problems
> ensue.  This is another area that could use careful investigation.

Is it impossible to set this information in gcj-compiled classes?

> The other thing I tried was running Eclipse with gij.  This seemed
> like a promising idea since it would let us see problems in our
> runtime coverage.  Unfortunately the problems come rather quickly.
> First, Eclipse makes heavy use of ClassLoaders and expects them to
> work properly.  We've always been a bit weak here.  In the end Andrew
> wrote a patch to let us handle ClassLoaders properly.  This required
> some gcc changes that I think he's still negotiating to get checked
> in.  Once his patches go in, I have some supplementary patches to fix
> a few related problems in libgcj.  (This means that more work down
> this avenue would probably be blocked pending these patches.)

Are these patches already cheched in?

> Second, there are still unfixed bugs in the libgcj bytecode verifier.
> One of these is already a PR; the others I found during this process
> are basically variants of the PR.  Quick fixes failed; in the end I
> just disabled the verifier in an attempt to make progress :-(.
> At this point I ran into a memory corruption problem.  It looks to me
> like a premature object collection or perhaps a heap overwrite.  I
> spent some time looking into it, but not enough time, and then the
> clock ran out.

Do you have a start script with classpath setting or something else so 
that others can try running eclipse with gij?

> What I found when taking this approach was that we never got out of
> the Eclipse startup; every bug in libgcj would cause Eclipse to halt.

Sounds like eclipse i a good test case for gcj/libgcj. 

Trying to compile the eclipse source code could be done by using the
existing ant build scripts from eclipse and setting the 'build.compiler'
property to 'gcj'. Is this worth trying?



Gesendet von Yahoo! Mail -
Weihnachts-Einkäufe ohne Stress!

More information about the Java mailing list