There is always such a problem, that is, the newly downloaded Eclipse open a project with the enum keyword, there is always a situation where you do not know enum.
It is observed that the JRE system library of the project has already been set to 1.5 or 1.6. In theory, the enum keyword should be supported.
I was puzzled and found that the JRE configuration is actually used, not the compiler configuration.
The error check in eclipse is subject to the compiler settings:
On the windows-> preferences-> JAVA-> compiler tab, we can see the compilation Depth set in eclipse. If we do not set the depth to 5.0 or 6.0, there is no way to use the enum keyword.
After the modification is complete, rebuilt the entire project and the annoying little red XX disappears.
Generally, eclipse of Sb prefers to set it to 1.4 by default. I don't know why.