Is there a way to reset the error badges in Netbeans?

Viewed 7572

Netbeans sometimes displays error badges in situations where no actual error occours. (Often on folders, too)

Although Google finds many pages reporting this issue for various Netbeans versions, I could not found a solution to reset the error badges without deleting and re-creating the project with a different name (!).

How can I remove the badges besides recreating the project?

Somewhere Netbeans has to store the information which folder has an error badge. Perhaps it is possible to delete some kind of cache and be done with it.

7 Answers

In my case, it was not userdir that makes the error, it was cachedir.

The cachedir is separate from userdir and its default path is also system specific:

  • C:\Users\\AppData\Local\NetBeans\Cache\8.2\ on Windows
  • /Users//Library/Caches/NetBeans/8.2/ on Mac OS X
  • /home//.cache/netbeans/8.2 on Unix-like systems

I try to find the root cause by finding .err and .warn using find command.

  • find . -name *.err -type f
  • find . -name *.warn -type f

I find 0 warn file and 4 error files. However, the error files is not related to my project.

I ended up deleting (or rename to .old) Caches/NetBeans/8.2/, I open up NetBeans and the error icon is gone. Beware that using this approach NetBeans will take a longer time to launch.

On netbeans 11 it was not enough to just remove the .err and .warn files. I had to remove the index directory which was in ~/.cache/netbeans/11.0

Related