This is the mail archive of the java-discuss@sources.redhat.com 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]

gcj 2.96 and rh7


[ RESEND -- this went out 20-Nov but vanished entirely ]

I've been using GCJ with some Java/Linux software, and
it mostly behaves -- nice to have a more recent "QA'd"
release than the 2.95 series! -- but I thought some folk
might be interested in some problems I saw there:

- nonstatic inner classes compiled wrong from source.
  I ran into several runtime SEGVs where GDB said
  the "this" pointer was bogus.  All went away if I
  just made those inner classes be static.  (These
  were nonpublic classes, which may have mattered;
  several classes needed that same workaround.)

- a "catch" clause in a constructor seemed to cause
  the constructor to return a null object, until I
  noticed that a  System.err.println() call seemed
  to perturb code generation so that it worked.  (The
  only tricky bit in that "catch" was a conditional
  rethrow of the caught exception, I'd say.)

- "java -help" didn't list "--main=" as significant.
  (And the usual similar minor frustrations.)

Everything seems to be working OK now.  I hadn't used
GCJ since about this time last year, and it's much
improved!  I look forward to GCJ getting into GCC 3.x,
facilitating a new chapter for Java developers!

With respect to performance, I noticed two things very
quickly.  First, startup time is negligible compared to
the same program using JDK 1.3 (or even 1.2); since one
common usage is a command line program, that matters.
Second, I/O seemed a lot faster:  Sun's JVM is "jerky"
at many things; the GCJ version was consistently fast,
and felt "peppy".  (This software is I/O centric.)

Are other folk having success with this version of GCJ?

- Dave

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