I guess the only reason I've been compiling with jdk 1.4-"compliant"
jdk 1.5 is that I want to run with 1.5 by default, and to change the
compiler, you'd have to change the compiler for each project (which
would then be forced on others via the .project file), or you'd have to
change the jre for each "run" configuration. Is there any way to set a
jre as the default compiler, but a different jre as the default "run"
jre?
Brian Vosburgh wrote:
I've been assuming that when we say we are compiling with 1.4
compliance that we imply we are also compiling with the 1.4 jars (e.g.
rt.jar) on the build path. It does not make sense to use the 1.5 jars
since 1.5 classes can have covariant return types like what we see here
(i.e. Writer.append(...) returns a Writer, while
PrinterWriter.append(...) returns a PrintWriter). I'm guessing
covariant return types would really confuse a compiler trying to
compile something to be 1.4-compliant. Does anyone see a reason why we shouldn't
be compiling with the 1.4 jars on the build path?
Brian
Paul Fullbright wrote:
I believe
it's because of the Writer/PrintWriter hierarchy.
In the 1.5 jdk, we have:
java.io.Writer
Writer append(...)
java.io.PrintWriter
PrintWriter append(...)
and in 1.4, it doesn't look like those methods exist.
Not sure exactly how you can have 1.4 compliant code using the 1.5
version of the jdk, since the method return type override seems to
break compliance. Of course, why IndentingPrintWriter doesn't
complain, I don't know. Perhaps it's because the 1.4-compliant eclipse
1.5 compiler doesn't compile IndentingPrintWriter correctly, although
having EntitySourceWriter extend PrintWriter directly doesn't solve the
compile problem. The other explanation is the nested class nature of
EntitySourceWriter, but I have no idea why that would do anything here.
-pwf
Max Rydahl Andersen wrote:
It is weird.
using jdk 1.4.2_08 for build path no errors
using jdk 1.5.0_05 for build path I get the errors.
/max
Brian,
I am also seeing this, and Max and Shaun were both having the problem
as well. Not sure what is going on though. Very strange. Karen does
not have the problem, but we are both using the same Eclipse build.
Neil
-----Original Message-----
From Markus Kuppe <mkuppe@xxxxxxxxxxx>
Sent Thu 3/23/2006 2:48 PM
To General Dali EJB ORM developer discussion. <dali-dev@xxxxxxxxxxx>
Subject Re: [dali-dev] Policy on Java compliance
Brian Vosburgh wrote:
Markus, I don't see any compile
problems with
EntityGenerator.EntitySourceWriter. I can compile all the plug-ins with
a compiler compliance level of 1.4 without any problems. Also, AFAIK,
the Eclipse platform plans on shipping 3.2 with Java 1.4 compliance.
What problems are you encountering?
Markus Kuppe wrote:
Hi,
whats our policy on Java code compliance?
EntityGenerator.EntitySourceWriter seems to rely on Java 5. So are we
going for Java 5 now?
Hi,
I get following errors with code compliance and source/class
compatibility set to 1.4. Changing the workspace compliance to 1.5
fixed
the compile problem so I figured its related to Java 5.
- Error org.eclipse.dali.ui/source/org/eclipse/dali/ui/actions
EntityGenerator.java The return type is incompatible with
Writer.append(char), PrintWriter.append(char) line 753
- Error org.eclipse.dali.ui/source/org/eclipse/dali/ui/actions
EntityGenerator.java The return type is incompatible with
Writer.append(CharSequence, int, int), PrintWriter.append(CharSequence,
int, int) line 753
- Error org.eclipse.dali.ui/source/org/eclipse/dali/ui/actions
EntityGenerator.java The return type is incompatible with
Writer.append(CharSequence), PrintWriter.append(CharSequence) line
753
----
Max Rydahl Andersen
callto://max.rydahl.andersen
Hibernate
max@xxxxxxxxxxxxx
http://hibernate.org
JBoss Inc
max.andersen@xxxxxxxxx
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
|