[kaffe] gcj-3.3.2 + Kaffe CVS: java.lang.IllegalAccessError

Everton da Silva Marques everton at lab.ipaccess.diveo.net.br
Wed Nov 12 11:38:02 PST 2003


I'm getting the following IllegalAccessError:

$ /usr/local/kaffe/bin/java -classpath . Main
java.lang.IllegalAccessError: a/B.m
   at Main.main (Main.java:7)

But only when I compile my code with gcj into
bytecode and run under Kaffe. The table below
summarizes the tests.

gcj:   3.3.2
kaffe: CVS (ChangeLog head: 2003-11-12 Ito Kazumitsu <kaz at maczuka.gcd.org>)
jdk:   j2sdk1.4.2_02

compiler VM    result
gcj      j2sdk ok
gcj      kaffe IllegalAccessError
j2sdk    j2sdk ok
j2sdk    kaffe ok

This is a source code sample to reproduce the issue:

// a/A.java
package a;
abstract class A {

// a/B.java
package a;
abstract class B {
    public void m() {

// a/C.java
package a;
public class C extends B {

// Main.java
import a.C;
public class Main {
    public static void main(String args[]) {
        C obj = new C();


More information about the kaffe mailing list