GCJ relies upon a modified version of ECJ 3.11.1, a part of Eclipse 4.5.1, released in February 2016.
The corresponding Maven artifact, available from Maven Central, is
org.eclipse.jdt.core.compiler:ecj:4.5.1
.
The GCCMain
class invoked by ecj1
is available from Debian patches (ecj
version 3.11.1 available as a part of Debian 9 "Stretch").
When configuring GCC (5.x or 6.x), the --with-ecj-jar
switch should
be passed to the configure
script, e.g.:
./configure --with-ecj-jar=/usr/share/java/ecj.jar
If libecj-java
package is upgraded along with Debian Linux, the GCCMain
class will be gone, breaking the Java-to-bytecode compilation feature of GCJ
(gcj -C
).
- Cygnus Implementation of the Java Language, June 1998
- Guide to GNU gcj
- The Cygnus Native Interface for C++/Java Integration
- GCJ: the GNU Compiler for Java, January 2003
- Java CNI, December 2002
- Proceedings of the GCC Developers’ Summit, June 2004
- Java — CNI — X Window System (JCNIX)
- Java/C++ integration: Writing native Java methods in natural C++