if "debug" has been recently activated then check the top right of the program (under the minimise button) and click back onto java.


in my case i setted a old workspace and it was the problem.

try to set a new folder for workspace


i could reproduce this issue by creating an enumeration with a non-static member class and a static block enumerating its values:

public enum foo {
dummy(new bar [] {new bar()});
static {
    for (foo foo: foo.values());
private foo(bar [] params) {}
public class bar {}

this class breaks the ganymede compiler. if you delete the line in the static initializer block, the code compiles correctly again, and you get the error that there is no enclosing instance for the new bar() call, as expected.

-- correction: the above holds only if the project has gaenature from google appengine. however, if you get an error similar as mentioned in the original question, you might be encountering another java compiler bug ...


i have the same issue with eclipse helios and the m2eclipse plugin. they just can't seem to get this thing to work with wtp or wpt or whatever the blasted acronym is.

if i do a clean on the project and watch the maven console then i can see the compilation issues in the console but eclipse won't touch it. it seems eclipse or wtp/wpt and m2eclipse are busy playing slap hands.


i experienced that problem with a mapreduce project. i closed the error window and never came back after doing what the other answers suggested.

click on the bottom left -> other -> problems

enter image description here


kepler sp2, java project (web driver), and we use gradle instead of maven

none of the above helped, what did fix the problem for me was to select my projects (r-click) > gradle > refresh all


pointing the source(src) folder to the build path will solve this easily to do so right click on the project > build path > configure build path > java build path > source > add folder and click apply

enter image description here


my mistake was that i was creating classes in resource package...

creating classes in src/main/java solved the issue.


check your filters, sometimes problem view could be scoped to a working set that you are not currently working in. also, you can check other configurations for the problem view.

enter image description here


problem in .classpath i did "replace with head revision" to get back the version that i had in the repository git and the errors appear again.


duplicates in build path

in my case, errors were not showing up in the problems view or package explorer views because my build path had duplicate entries for src and test directories:

enter image description here

removing these from project -> properties -> build path (and just leaving one each) did the trick.


on ganymede, check the configuration of the problem view:

('configure content') it can be set on 'any element in the same project' and you might currently select an element from the project.

or it might be set on a working set, and this working set has been modified

make sure that 'match any configuration' is selected.


in my case eclipse wasn't properly picking up a java project that a current project was dependent on.

you can go to project > buildpath > configure buildpath and then delete and re-add the project.


there are obviously several reasons why this might occur, and i thought i'd add the solution to my issue. (i have a java project into which i have imported files with virtual links)

if you have a situation like mine, you will have another folder on the same level as your 'src' folder. if you do, right-click on that other folder, then select 'build path' > 'add to build path' (if you see 'build path' > 'remove from build path', then it had already been added.)

to further configure the build path, right click on your top level project dir, and select 'build path' > 'configure build path'. your folders should show up in the 'source' tab.

to configure what errors you see, click on java compiler > errors/warnings and then click 'configure workspace settings'. that is the same as going to window > preferences > java > compiler > errors/warnings. if you don't want eclipse to ignore something, then just change it to warning.


if you have reached here that means all the other solutions did not work for you. one reason could be your source folder is not a java project.

solution would be to run below command on the source folder

mvn eclipse:eclipse

this worked for me.

if this also doesn't work then try removing .classpath and .project file and run the above command again


what worked for me is creating a new problems view (this option is accessible from the three-dots view options):

screenshot showing 'new problems view' option

the new view does show all the warnings and errors that were detected:

enter image description here


i have also faced the same problem.

after installing m2eclipse plugin, i was not getting any java compilation errors.

my solution was to enable dependency management by select project -> right click (to get context menu) -> m2 maven -> enable dependency management.

now i am able to view java compilation errors.


try following:

  1. open problems window (windows -> show view -> problems)

  2. right click on the error and then quick fix

this procedure helped me solve the same problem.


this is normal problem. in wich order and export function sometimes get turned off.

right click on project<properties< there u hav option build path < and there order and export< click right all the options....all the things are right back.


at the top right corner of the problems window (next to minimize) there is a small arrow-icon. click it and select "configure filters". there is a severity filter that might have been activated.


i have the same problem in slight different situation. i have a parent pom and multiple modules under it. project was existing and i imported it into eclipse. i can change the "dependency management" only to parent project but not projects under it. they are not showing any compilation warnings.

next i'm going to try to change them all into individual projects... that's not what i wanted, but i haven't been able to solve this otherwise...


i was experiencing this problem as well today. the other solutions presented here (such as cleaning the project and restarting eclipse) did not work or were not applicable to my setup. what did work for me was right-clicking on the project in the package explorer and selecting maven->update project configuration. evidently some source folder restructuring i had done the previous day had caused maven to lose track of things, and issuing this command fixed everything.


  1. check your source directory is listed in source folder of project

    • right-click your project > build path > configure build path > source.
  2. if you are using multiple projects (as dependencies)

    • project->clean...,

      enter image description here
  3. check "build automatically" is enabled or not.

    • project > build automatically

      enter image description here


i installed and deinstalled ajdt-plugin and got the same problem.

check <project><properties><builders>. it should have a 'java builder'.

this code should be in the .project file (file is in the root of your project):



this is not totally an answer to your question, but is related. i thought eclipse stopped showing red/yellow flags next to files in my project. the solution was very simple - i was looking at the navigator tab (which doesn't show error/warning flags) instead of the package explorer tab.

enter image description here


i want to post my story here if google brings you to this question.

somehow, "project->build automatically" got turned off.

turning it back on produces correct errors list.

in my case it has nothing to do with m2e 1.0. this is default behavior for any java project and goes back as far as ganymede ( at the point of writing this post i am running indigo )


right-click your project and go to properties > java build path > source.

make sure your source directory (for example myproject/src) is listed as a source folder. otherwise you won't get any red markers.


i had same problem and randomly did such things as (several times):

1) project->clean...,
2) close and open eclipse again,
3) run as...

and it started to work again, without changing configuration.

Related Query

More Query from same tag