[kaffe] Eclipse 3.0M4 on kaffe

Mark Wielaard mark at klomp.org
Fri Oct 31 01:58:02 PST 2003


Hi all,

On Thu, 2003-10-30 at 22:34, Mark Wielaard wrote:
> You will need eclipse-SDK-3.0M4-linux-gtk.zip from:
> http://download2.eclipse.org/downloads/drops/S-3.0M4-200310101454/

The same setup also works for the older eclipse-SDK-2.1.1-linux-gtk.zip.

> First replace java/net/URLen/decode.java with the versions from GNU
> Classpath.

This isn't necessary since I was using an "old" kaffe from CVS. In
recent CVS this and this has already been merged. (I was only 4 days
behind, but lots has changed and eclipse feels much more stable!).

> Lots of things work and with the File->New Project and File->New Class
> you get some wizard which should guide you through a simple "Hello
> World" type program which you should be able to run with the menu
> Run->Run As->Java Application to give you something like:
> http://www.klomp.org/mark/classpath/Screenshot-Kaffe-Eclipse3.png

And with one more patch to remove an assert() you can also get the
Windows->Open Perspective->CVS Repository Exploring working.

diff -u -r1.43 machine.c
--- kaffe/kaffevm/jit3/machine.c        11 Oct 2003 20:45:50 -0000      1.43
+++ kaffe/kaffevm/jit3/machine.c        31 Oct 2003 09:17:31 -0000
@@ -618,7 +618,7 @@
                        e->start_pc = getInsnPC(e->start_pc, codeInfo, code) + (uintp)code->code;
                        e->end_pc = getInsnPC(e->end_pc, codeInfo, code) + (uintp)code->code;
                        e->handler_pc = getInsnPC(e->handler_pc, codeInfo, code) + (uintp)code->code;
-                       assert (e->start_pc <= e->end_pc);
+                       // assert (e->start_pc <= e->end_pc);
                }
        }

This patch is also probably not a good idea, but hey, we want
screenshots!. And Tada, new screeny, actual checkout of kaffe inside
Eclipse with "visual compare" function:
http://www.klomp.org/mark/classpath/Screenshot-Kaffe-Eclipse3-cvs.png

> When you are finished playing look into workspace/.metadata/.log to see
> what breaks. And then fix it :)

A quick look doesn't show that much spectacular things (which
corresponds with the general feeling that most things just work!). It
seems that the JNI swt bindings use some other things which are not
implemented/produce NullPointerExceptions, but strangely this does not
really impact usability.

The interesting one is:

java.io.UTFDataFormatException: byte #5 invalid
   at kaffe.util.UTF8.decode (UTF8.java:87)
   at java.io.DataInputStream.readUTF (DataInputStream.java:175)
   at java.io.DataInputStream.readUTF (DataInputStream.java:171)
   at java.io.ObjectInputStream.readClassDescriptor (ObjectInputStream.java:424)   at java.io.ObjectInputStream.readObject (ObjectInputStream.java:226)
   at java.io.ObjectInputStream.readObject (ObjectInputStream.java:272)
   at org.eclipse.core.internal.runtime.AuthorizationDatabase.load (AuthorizationDatabase.java:270)
   [...]

This is probably kaffe serializing something to a file and beig unable
to deserialize it from that same file. Either writing or reading is
broken.

There are also some problems when running Ant on a project, but since
Ant almost immediatly cries that it cannot find tools.jar I have ignored
it.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://kaffe.org/pipermail/kaffe/attachments/20031031/991bf81b/attachment-0002.pgp 


More information about the kaffe mailing list