[kaffe] Bug Report: ClassFormatError for java.net.SocketImpl

Daniel Bonniot Daniel.Bonniot at inria.fr
Wed Apr 16 23:12:01 PDT 2003


>
>
>a) compile the class library using kjc
>
java.lang.ClassFormatError
        at java.lang.Class.getMethods0(Class.java:native)
        at java.lang.Class.getDeclaredMethods(Class.java:240)
        at Test.main(Test.java:7)

>b) compile the class library using jikes 1.18
>
Warning: Unrecognized version number 47/0 in classfile.
Warning: Unrecognized version number 47/0 in classfile.
...
Warning: Unrecognized version number 47/0 in classfile.
java.lang.ClassFormatError
        at java.lang.Class.getMethods0(Class.java:native)
        at java.lang.Class.getDeclaredMethods(Class.java:240)
        at Test.main(Test.java:7)
Warning: Unrecognized version number 47/0 in classfile.

>c) compile the class library using jikes 1.18 with JAVAC_FLAGS="-source 1.2
>-target 1.1"
>
java.lang.ClassFormatError
        at java.lang.Class.getMethods0(Class.java:native)
        at java.lang.Class.getDeclaredMethods(Class.java:240)
        at Test.main(Test.java:7)

(with no warning)

Yes, I do think they are loading the right classes. With -verbose, I see:
Loading java/net/SocketImpl.class(/tmp/kaffe-with-kjc/jre/lib/rt.jar) 
[compressed]
or
Loading 
java/net/SocketImpl.class(/tmp/kaffe-with-tamed-jikes/jre/lib/rt.jar) 
[compressed]

And the rt.jar files do differ:

$ ls -l /tmp/kaffe-with-tamed-jikes/jre/lib/rt.jar
-rw-r--r--    1 daniel   daniel    2401618 Apr 16 20:41 
/tmp/kaffe-with-tamed-jikes/jre/lib/rt.jar
$ ls -l /tmp/kaffe-with-kjc//jre/lib/rt.jar
-rw-r--r--    1 daniel   daniel    2504817 Apr 16 21:00 
/tmp/kaffe-with-kjc//jre/lib/rt.jar

BTW, I had to give --without-jikes to configure to get kaffe use kjc. It 
seems the default is jikes.
I put /tmp/kaffe-with-tamed-jikes/bin before building kaffe-with-kjc.

Daniel






More information about the kaffe mailing list