Hi
My current project is in Java 1.4.2, and I was wondering if there was
any way to turn off the warning that ''enum' should not be used as an
identifier, since it is a reserved keyword from source level 5.0 on''
Thanks in advance.
IchBin - 06 Dec 2005 02:54 GMT
> Hi
>
[quoted text clipped - 3 lines]
>
> Thanks in advance.
You can try below path but think you have to be running 5.0 in Eclipse.
Windows \ Preferences \ Java \ Compiler \ Error/Warnings
\ J2SE 5.0 Options

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
IchBin - 06 Dec 2005 03:13 GMT
>> Hi
>>
[quoted text clipped - 8 lines]
> Windows \ Preferences \ Java \ Compiler \ Error/Warnings
> \ J2SE 5.0 Options
Sorry, It can be turned of for 1.4
Windows \ Preferences \ Java \ Compiler \ JDK Compliance \ Use
Compliance settings \ Disallow identifiers call 'enum'

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
MartinKess@gmail.com - 06 Dec 2005 03:17 GMT
Hendrik Maryns - 06 Dec 2005 11:52 GMT
MartinKess@gmail.com schreef:
> Hi
>
> My current project is in Java 1.4.2, and I was wondering if there was
> any way to turn off the warning that ''enum' should not be used as an
> identifier, since it is a reserved keyword from source level 5.0 on''
Then set the project properties to 1.4 compliance:
Project -> Properties -> Java Compiler -> Enable project specific
settings -> Compiler compliance level
H.

Signature
Hendrik Maryns
==================
www.lieverleven.be
http://aouw.org
Roedy Green - 06 Dec 2005 21:10 GMT
>My current project is in Java 1.4.2, and I was wondering if there was
>any way to turn off the warning that ''enum' should not be used as an
>identifier, since it is a reserved keyword from source level 5.0 on''
It should not, just as goto should not even though it is not
implemented.
Ironically, the tools to turn off warnings come in JDK 1.5, where
using enum that way is an error not a warning.
What you are doing is a bigger sin than you imagine.
1. JDK 1.4 is already 14 months old. At some point it will be
discontinued. You are fobbing the job of fixing your error off on
someone in the future who will know less than you about your program.
2. in the meantime anyone writing JDK 1.5+ code won't be able to
reference you code even if your code is compiled in 1.4.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
mrandywarner@gmail.com - 06 Dec 2005 21:37 GMT
Actually in preferences if you go to Java->Compiler in the "JDK
compliance" section there is a setting called "Disallow identifiers
called 'enum'" that lets you set the level to Ignore, Warning, or Error