classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Eclipse 3.0


From: Mark Wielaard
Subject: RE: Eclipse 3.0
Date: Sun, 04 Jul 2004 14:35:38 +0200

Hi,

On Sat, 2004-07-03 at 13:14, Mark Wielaard wrote:
> On Sat, 2004-07-03 at 10:43, Jeroen Frijters wrote:
> > BTW, what Eclipse version are you using?
> 
> eclipse-SDK-3.0-linux-gtk.zip from
> http://download2.eclipse.org/downloads/drops/R-3.0-200406251208/index.php
> 
> I am still just using what is described here:
> http://lists.gnu.org/archive/html/classpath/2004-07/msg00026.html
> Plus the above two patches to java/net/URL.java mentioned above.
> And I start it all up by:
> LD_LIBRARY_PATH=plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86:plugins/org.eclipse.core.resources.linux_3.0.0/os/linux/x86:plugins/org.eclipse.update.core.linux_3.0.0/os/linux/x86
>  PATH=.:/usr/local/jamvm/bin ./eclipse -vm jamvm -debug -consoleLog -vmargs 
> -bootclasspath/p /tmp/xalan 
> -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
>  -Dosgi.locking=none
> 
> Where /tmp/xalan contains all the (extracted!) jar files from
> xalan-j_2_6_0/bin.
> 
> It is good to see both Anthony and you able to get it starting up now.
> That means my Classpath library work is done ! :)
> 
> Now the rest of the work can be offloaded to the runtime hackers.
> (CC Robert!)
> I still get the following errors during startup from jamvm:
> 
> java.lang.IncompatibleClassChangeError: unimplemented interface
>    at org.eclipse.ui.keys.KeyStroke.hashCode (KeyStroke.java:311)
>    at java.util.HashMap.hash (HashMap.java:686)
>
> java.lang.IncompatibleClassChangeError: unimplemented interface
>    at org.eclipse.ui.keys.KeyStroke.equals (KeyStroke.java:270)
>    at java.util.AbstractMap.equals (AbstractMap.java:511)
>    at java.util.HashMap.get (HashMap.java:301)
> 
> I worked around these by recompiling KeyStroke.java and not calling
> hashCode() and equals() on the modifiers SortedSet.
>
> Looks like some subtle class loading/instanceof bug to me.
> I first thought our Collections.UnmodifiableSet class wasn't correct
> though.

Found the bug in jamvm. This happens when the interface method
in question is one of the Object methods hashCode(), equals(),
toString(), etc. and (re)defined in one of the super interfaces of the
interface on which the actual method is called.

The attached patch was the quickest way I could think of to work around
it. Apply against jamvm 1.1.4. Robert will surely yell and scream if
this is horribly wrong and provide a nice clean solution I am sure :)

> Then I finally get:
> 
> java.lang.NoClassDefFoundError: org/eclipse/swt/custom/CTabFolder
>    at org.eclipse.ui.internal.presentations.PaneFolder.<init>
> (PaneFolder.java:197)
> 
> Which doesn't make sense :{

Correct! It doesn't make sense. Jamvm isn't that good at handling out of
memory situations and Eclipse demands lots and lots of memory. So apply
the attached patch to jamvm. Update your GNU Classpath from CVS (it now
contains all Anthony his URL patches). Follow the rest of the
instructions above, but now start it with a little bit more memory like:

LD_LIBRARY_PATH=plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86:plugins/org.eclipse.core.resources.linux_3.0.0/os/linux/x86:plugins/org.eclipse.update.core.linux_3.0.0/os/linux/x86
 PATH=.:/usr/local/jamvm/bin ./eclipse -vm jamvm -debug -consoleLog -vmargs 
-ms128M -mx128M -bootclasspath/p /tmp/xalan:/tmp/xalan/other:/tmp/xerces 
-Dosgi.locking=none

And enjoy! As Jeroen said there are still lots of things broken, but on
the other hand there are also lots of things that just work.

Please play around with it and try to fix what you can!

Cheers,

Mark
--- src/resolve.c.orig  2004-07-04 13:24:00.000000000 +0200
+++ src/resolve.c       2004-07-04 13:27:05.000000000 +0200
@@ -65,6 +65,21 @@
     return NULL;
 }
 
+MethodBlock *lookupInterfaceMethod(Class *class, char *methodname, char *type) 
{
+    MethodBlock *mb;
+
+    if((mb = findMethod(class, methodname, type))) {
+       if ((CLASS_CB(mb->class))->access_flags & ACC_INTERFACE) {
+           return mb;
+       }
+    }
+
+    if(CLASS_CB(class)->super)
+        return lookupInterfaceMethod(CLASS_CB(class)->super, methodname, type);
+
+    return NULL;
+}
+
 FieldBlock *lookupField(Class *class, char *fieldname, char *fieldtype) {
     ClassBlock *cb;
     FieldBlock *fb;
@@ -225,7 +240,7 @@
                 return NULL;
             }
             
-            if((mb = lookupMethod(resolved_class, methodname, methodtype)) == 
NULL) {
+            if((mb = lookupInterfaceMethod(resolved_class, methodname, 
methodtype)) == NULL) {
                 ClassBlock *cb = CLASS_CB(resolved_class);
                 int i;
 

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]