GCJ

GCJ Home
GCC Home
Status
FAQ
Documentation
Contributing
Done with GCJ

About GCC

Mission Statement
Mailing lists
Timeline
Contributors
Steering Committee

Documentation

Installation
· Supported Platforms
· Testing
Manual
FAQ
Further Readings

Download

Releases
Snapshots
Mirror sites
Binaries

Development

Development Plan
· (tentative timeline)
Contributing
...Why?
Open projects
Front ends
Back ends
Extensions
CVS read access
Rsync read access
CVSup mirrors
CVS write access

Bugs

Report a bug
Bug database (Bugzilla)
...Management
Known bugs


Get our announcements:

The GNU Compiler for the Javatm Programming Language

What is GCJ?

GCJ is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile:

  • Java source code directly to native machine code,
  • Java source code to Java bytecode (class files),
  • 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.

Most of the APIs specified by "The Java Class Libraries" Second Edition and the "Java 2 Platform supplement" are supported, including collections, networking, reflection, and serialization. AWT is currently unsupported, but work to implement it is in progress.

Debugging is supported using recent versions of the GNU debugger, GDB. A short tutorial on using GDB to debug GCJ-compiled applications is available.

In addition to regular native programming, GCJ can be configured as a cross-compiler, suitable for embedded systems programming.

GCJ is part of the GNU Compiler Collection (GCC). GCC, GDB and related tools are Free Software. libgcj is slowly being merged with GNU Classpath. (You can see the status of the merge.)

Many free software Java packages have been ported to work with GCJ. A collection of such packages are in the rhug project. Both sources and RPMs are available.

For javax.crypto support, we recommend the use of GNU Crypto.



GCJ News

January 22, 2004 Graydon Hoare has checked in a patch to implement Swing buttons. This is the first working Swing code, a major improvement. See the screen shot.
January 9, 2004 Andrew Haley has checked in a large reorganization of -findirect-dispatch. This is an important step toward the new binary compatibility ABI.
September 3, 2003 Jeff Sturm has adapted Jan Hubicka's call graph optimization code to gcj. This code improves gcj's method inlining abilities with support for out-of-order methods and inter-class method calls, along with improved code size heuristics. It is enabled by default when compiling at -O3.
August 4, 2003 Gary Benson from Red Hat has released Naoko: a subset of the rhug packages that have been repackaged for eventual inclusion in Red Hat Linux. Naoko basically comprises binary RPMS of Ant, Tomcat, and their dependencies built with gcj.
August 2, 2003 Tom Tromey, Andrew Haley and others from Red Hat win the Fast Free Eclipse Prize.
August 1, 2003 A team of hackers from Red Hat has released RPMS for a version of Eclipse, a free software IDE written in Java, that has been compiled with a modified gcj. You can find more information here. We'll be integrating the required gcj patches into cvs in the near future.
July 31, 2003 Andrew Haley has checked in a major patch to the tree-ssa branch that allows us to convert entire functions to trees when reading from .class files. This is an important step towards better high-level optimizations for Java.
July 30, 2003 Thanks to Andreas Tobler and Jeff Sturm, libgcj is now built by default for Darwin. This work is available on the cvs trunk, and will show up in GCJ 3.4.
July 28, 2003 Michael Koch has announced the first (0.0.1) release of gcjwebplugin. This is a plugin to allow execution of applets in web browsers like Mozilla, Konqueror, and Opera. Currently it is still a proof-of-concept.
May 14, 2003 GCC 3.3 has been released. This release includes many bug fixes, support for assert, and JDBC 3.0 support in java.sql and javax.sql, among other things.
January 3, 2003 Jeff Sturm implemented libffi closures for SPARC so that libgcj's bytecode interpreter is now available on SPARC Solaris hosts.
January 1, 2003 The January 2003 issue of Linux Journal contains the article Compiling Java with GCJ by Per Bothner.
Less recent GCJ news

Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to contact the FSF.

These pages are maintained by the GCC team.

For questions related to the use of GCC, please consult these web pages and the GCC manuals. If that fails, the gcc-help@gcc.gnu.org mailing list might help.
Please send comments on these web pages and the development of GCC to our public developer mailing list at gcc@gnu.org or gcc@gcc.gnu.org.

Copyright (C) Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

Last modified 2004-01-25 Valid XHTML 1.0