-->

Eclipse Kepler shows error marks on warnings

2019-08-25 19:19发布

问题:

I've got a problem with Eclipse Kepler. In my Java project i've got some warnings and now they are shown as error marks (red crosses) in the project explorer.

It looks like this picture http://i.stack.imgur.com/H8j7f.png

So my question is: Is it possible to switch it back to the yellow cross for warnings and red cross for errors? I haven't found anything about it, so I hope you can help me.

Edit:

I've made a test project, and here is a screenshot:

Thanks!

回答1:

It might me because you set the compiler to mark as errors what used to be a warning. You can set this in the Window->Preference menu. So open it and go into Java->Compiler->ErrorsWarnings and check if everything is like you want it to be.

You can also check into the compiler menu (Java->Compiler) if the java Compiler compliance level is set as you want it to be as @Chrylis suggested.

Otherwise it might be because your program is unable to compile because of a dependency problem then you might want to check your build path or JRE in the Run configurations menu.

Right click on your project -> Run as -> Run Configurations.



回答2:

I solved it :)

At the first start I took my old workspace as workspace. Because of that there was an Error "Missing Action set" (I've found the "error log"-window :) ) and thats why the red crosses has been shown.

Now I have a new workspace and now everything is fine!