Strange eclipse compilation error [message #189836] |
Thu, 16 December 2004 15:35  |
Eclipse User |
|
|
|
Originally posted by: cao.mobilematrix.net
Hi,
I'm using eclipse 3.0.1 build 200409161125 with latest JDT etc. I got
strange compilation errors only when extending PrintWriter and
implementing Runnable at the same time.
here is the sample code
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
public class Test extends PrintWriter implements Runnable {
public Test(OutputStreamWriter out, boolean flag) {
super(out, flag);
}
public void run() {
}
}
here is the error:
The return type is incompatible with Writer.append(char),
PrintWriter.append(char)
When I use ant to compile, I have no problem at all. Did anyone see this
before? Could this be a bug in eclipse or that code does have something
wrong?
Any hint would be highly appreciated!
Cao
PS: my os = windows xp home with sp2;
my java = 1.5.0 build 1.5.0-b64
|
|
|
Re: Strange eclipse compilation error [message #189857 is a reply to message #189836] |
Thu, 16 December 2004 17:24  |
Eclipse User |
|
|
|
Originally posted by: olivier_thomannNOSPAM.ca.ibm.com
G Cao a écrit :
> The return type is incompatible with Writer.append(char),
> PrintWriter.append(char)
>
> When I use ant to compile, I have no problem at all. Did anyone see this
> before? Could this be a bug in eclipse or that code does have something
> wrong?
>
> Any hint would be highly appreciated!
If you use 1.5 libraries, compile using the compliance 1.5 or switch to
1.4 librairies.
--
Olivier
|
|
|
Powered by
FUDForum. Page generated in 0.02880 seconds