Community
Participate
Working Groups
This appears to be an outage in 1.5 implementation, although I am not sure. If you import the source code for the org.eclipse.jdi.debug (jdimodelsrc.zip), you will notice an error in PrimitiveValueImpl.compareTo(). It seems that it can't find the compareTo(Object) method in the Character class, among others. Interestingly, if you go Character.compareTo(), you will notice that while the Outline view shows both compareTo() methods, you cannot jump to the compareTo(Object) method.
Can you please specify the Eclipse build number ? Also do you have a 1.5 rt.jar library on your classpath, or a 1.4.x one ?
This is the M4 build: 200412162000. I am running under 1.4.2, but I am using the 1.5 jre that I setup under "Installed Java Runtime Environments". The 1.5 configuration, my default, is pointing to the 1.5 rt.jar.
The Eclipse compiler is right. In 1.5, the java.lang.Character.compareTo(java.lang.Object) method doesn't exist anymore. It is a bridge method. As a bridge method, it cannot be accessed directly. Try to compile this test case: public class X { public static void main(String[] args) { Object o = new Object(); Character c = new Character('c'); System.out.println(c.compareTo(o)); } } using javac 1.5.0_01. It doesn't compile. X.java:5: compareTo(java.lang.Character) in java.lang.Character cannot be applied to (java.lang.Object) System.out.println(c.compareTo(o)); ^ 1 error Only java.lang.Character.compareTo(java.lang.Character) exists in 1.5. In 1.4, both methods existed. This seems to be a case where there is no backward compatibility. Need further investigation.
The jdi code will need to be changed to compile under 1.5.