Summary: | The Eclipse Compiler wrongly reports methods as ambiguous if the JDK Compliance level is set to 1.3 | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Daniel Mateescu <dmateescu3> |
Component: | Core | Assignee: | Kent Johnson <kent_johnson> |
Status: | VERIFIED WORKSFORME | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | Olivier_Thomann, remy.suen |
Version: | 3.3.2 | ||
Target Milestone: | 3.5 M1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Daniel Mateescu
2008-07-18 16:38:11 EDT
I tried compiling the file with '-source 1.2' and '-source 1.3' with JDK 6's javac and it seems to work. Which JRE are you compiling against ? Is it also 1.3 ? (In reply to comment #2) > Which JRE are you compiling against ? Is it also 1.3 ? If you were talking to me, then I presume no since I'd assume the JDK 6 javac would just use the JDK 6 libraries. For the record, I'm pretty sure I've seen something like this when writing eRCP code which targets a CDC-1.0/Foundation-1.0 JRE. Actually I was asking Daniel what version his JRE is. If the JRE version is above 1.3 then that is likely the problem. (In reply to comment #4) > Actually I was asking Daniel what version his JRE is. > If the JRE version is above 1.3 then that is likely the problem. Hi Kent. The JRE version I'm using is 1.5.0_06. Regards, Daniel I still think it's worth fixing it, many JavaME developers are using a JRE above 1.3 and targetting a JDK compliance of 1.3, as CLDC requires. Daniel Actually its the SourceLevel = 1.3 that CLDC needs, NOT the ComplianceLevel. You want to prevent users from using 1.5 Java constructs in their code. The ComplianceLevel should match the JRE version. To duplicate what you've done with javac, you need to run javac 1.3 & point it at the class libraries from 1.5/6.0. Then you'll see the same ambiguous errors. Verified for 3.5M1 using I20080805-1307 |