[josm-dev] Another Java version conflict
Ulf Lamping
ulf.lamping at googlemail.com
Tue Jan 20 01:14:44 GMT 2009
Andre Hinrichs schrieb:
> On Dienstag, 20. Januar 2009, Ulf Lamping wrote:
>> My mistake!
>>
>> I'm a bit unsure how to fix this. Simply remove the @Override statements?
>
> I would say yes, since the annotation is to tell the compile to through errors
> when there a method is misspelled. Java 5 allows this only for super classes
> and java 6 also allows this for interfaces. Since getValue is defined in an
> interface this workes only for Java 6.
>
> It compiles fine here if I remove the @Override annotations.
It also compiles fine if I just remove it. I've fixed it in SVN1303.
Funnily I just copied and modified the line from above in
RelationListDialog.java:64
@Override public void mouseClicked(MouseEvent e) {
which looks quite similiar and seem to work with your JDK.
Life is not fair sometimes ;-)
>
>> Regards, ULFL
>>
>> P.S: Hmmm, I don't get those problems with my (latest) JDK version. I
>> thought that the ant scripts were telling the JAVA compiler to be 1.5
>> like - so I should see this?!?
>
> If you have UNIX you can call java-config -L to get available Java versions.
> You have to set the Java version with java-config -s <n>
> Don't know if this is the same procedure for Windows...
>
Windows
Although source and target settings for javac in the ant script are set
to 1.5, javac seems to simply ignore them (at least jdk1.6.0_11 on
Windows) :-(
As this problem don't seem to happen very often, please let us know if
that happens again, as I just can't check it here ...
Regards, ULFL
More information about the josm-dev
mailing list