 |
GNU Compiler for Java
Official Web site
Introduction
GCJ can compile Java sources and Java bytecode into native machine code. It's part of the GNU Compiler Collection (GCC). Java code can be mixed with the other languages supported by GCC, especially with C++. The resulting executable will depend on libgcj but not on any part of a Java runtime.
The Cygnus Native Interface (CNI)
The CNI enabled GCJ to mix C++-code and Java-code. Java classes can be derived from C++ classes and vice versa, See the documentation for details.
GCJ and GUI applications
GCJ does not support AWT or Swing at the moment. But it can compile applications using the StandardWidgetToolkit? (SWT). A detailed description can be found here.
Discussion about GCJ
- Is GCJ an option for closed source projects? It uses the GNU classpath which is GPL, so AFAIK all programs compiled with it have to be GPL as well. --Afishionado, 19 Feb 2005
- Yes - exactly as is the case with using GCC for compiling C-programs. The Java library is GPL with the exception that linking into it is allowed for all software - free or proprietary.
|