Americas

  • United States

GNU Compiler Collection and Java

Opinion
Jul 19, 20041 min
Enterprise ApplicationsLinux

* Dr. Internet columnist Steve Blass offers advice on GNU Compiler Collection and Java

Is it true that the GNU Compiler Collection (GCC) includes a compiler for Java that can produce Windows executable binary programs from Java source code?

The GCC’s GNU Compiler for Java (GCJ) can create binary executables from Java source code, and these can then be run on systems that don’t have a Java Runtime Environment. The Abstract Window Toolkit and Swing are not completely implemented but it is still possible to create programs with GUIs using IBM’s Simple Widget Toolkit (SWT), which is part of the Eclipse platform. To get started with GCJ on Windows, download the GCC/GCJ 3.4 package (https://www.nsf.gov/sbe/srs/nsf04311/sectb.htm). Download the GCC/GCJ 3.4 bundle rather than the 3.5 bundle, as the 3.5 bundle does not have the SWT dll required to run applications. To build the set of examples included with the GCC/GCJ bundle you also will want to download the file MSYS-1.0.10.exe from the download section of http://www.mingw.org so that you can use Make to automatically build the programs. Information about using GCJ with Eclipse and Ant rather than Make is available at https://www-106.ibm.com/developerworks/library/j-nativegui2/.