The GNU Compiler for the JavaTM Programming Language

GCJ is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile Java source code to Java bytecode (class files) or directly to native machine code, and Java bytecode to native machine code.

Compiled applications are linked with the GCJ runtime, libgcj, which provides the core class libraries, a garbage collector, and a bytecode interpreter. libgcj can dynamically load and interpret class files, resulting in mixed compiled/interpreted applications. It has been merged with GNU Classpath and supports most of the 1.4 libraries plus some 1.5 additions.

GCJ can also be configured as a cross-compiler, suitable for embedded systems programming. Recent versions of the GNU Debugger support GCJ (short tutorial).

GCJ News

September 11, 2006
Joel Dice has announced micro-libgcj 0.1, a lightweight version of libgcj intended to provide a usable subset of Java's features while remaining small and self-contained. This release fixes compatibility issues present in the initial 0.0 release and adds optional SWT support.
June 13, 2006
The May 2006 issue of Linux Journal contains the article "Embedded Java with GCJ" by Gene Sally.
June 6, 2006
RMS approved the plan to use the Eclipse compiler as the new gcj front end. Work is being done on the gcj-eclipse branch; it can already build libgcj. This project will allow us to ship a 1.5 compiler in the relatively near future. The old gcjx branch and project is now dead.
May 20, 2006
John David Anglin and Andreas Tobler checked in a patch to enable libjava to be built by default on the HP-UX PA 32-bit platform.
May 19, 2006
Mark Wielaard has imported GNU Classpath 0.91 (release notes) into GCJ.
April 26, 2006
Andrew Haley has merged in a patch that eliminates conservative scanning of static data and considerably speeds up garbage collection in many cases (for example, halving the time spent in garbage collection when running Eclipse).
April 17, 2006
Tom Tromey has announced the availability of two experimental Just-In-Time (JIT) interpreters for GCJ based on libjit and LLVM respectively. The source code for these JITs is available via the "gcj-jit" module of the rhug CVS repository (CVSweb interface).
April 4, 2006
fastjar has been removed from the GCC source tree and made into a separate project. The GCJ build process now requires an external tool for creating JARs - it searches for a tool named either jar or fastjar during configuration and reports an error if it is unable to find such a tool.
March 15, 2006
David Daney has merged in a patch that adds the new -freduced-reflection option to GCJ. This option prevents GCJ from generating most of the reflection metadata for classes resulting in smaller binaries. There are some caveats to using this option though - please read the GCJ manual for the implications of using this option.
March 9, 2006
Mark Wielaard has imported GNU Classpath 0.90 (release notes) into GCJ.
February 8, 2006
Mark Wielaard has written "A look at GCJ 4.1" for LWN.net.
GCJ

GCJ Home
GCC Home
Status
FAQ
Documentation
Contributing
Done with GCJ

About GCC
Mission Statement
Releases
Snapshots
Mailing lists
Contributors
Steering Committee
Documentation
Installation
· Platforms
· Testing
Manual
FAQ
Wiki
Further Readings
Download
Mirror sites
Binaries
"Live" Sources
SVN read access
Rsync read access
SVN write access
Development
Development Plan
· Tentative Timeline
Contributing
Why contribute?
Open projects
Front ends
Back ends
Extensions
Benchmarks
Bugs
Known bugs
How to report
Bug database
· Management