Like 3 days ago, my netbeams started to sometimes bug out. It is either when i am just starting netbeans, and "Background scanning of objects" get stuck at any percent (it varies), o ir if loads properly, after some time, "checking for external changes - suspended" will show up and then the problems starts: netbeans does not compile errors, does not open class or start a code (it will show as "lengthy operation in progress", after some time, output will show that no compiler was found, if clicked on class - "go to source or something like that"). After restarting netbeans, if it loads properly, it will run smoothly until same thing happens. Also, i saw that even when i close netbeans, there is a java process running in a task manager(uses like 30% of my cpu). I tried reinstalling, deleting everything by hand and then reinstalling, cleaning cache... Nothing helps. Also it happened at the same day on my 2 computers. I think it has something to do with "checking for external changes -suspended", because when a bug starts, this process will always appear. Even if i close it manualy (just click X), it will start again after few secs. I tried to disable automatic scanning of procceses in options it doesnt help, and acts the same (just checking for external changes suspended doesnt appear anymore). It is not consistent, but makes me unable to properly work. Maybe anyone has any ideas what should i do?
Asked
Active
Viewed 7,010 times
3
-
I have the same problem, still looking for a solution or cause. – Matt Mombrea Aug 16 '16 at 16:36
-
I managed to fix. The problem was 10thousand static imports in one class. I dont even know how they got there, deleting them fixed the problem. – Martynas Jonaitis Sep 20 '16 at 12:16
-
I managed to fix the problem. There were 8000 static imports in one of the classes. All of them was identical. No idea how they got there. But still, deleting them fixed the problem and now compilation work as normal. – Martynas Jonaitis Sep 20 '16 at 12:21
2 Answers
7
Yes, you should delete NetBeans cache! The path of the cache directory is listed in the About
window (menu Help/About
). Close NetBeans, then delete the directory. NetBeans will rebuild its cache when it starts up.

akelec
- 3,797
- 3
- 41
- 39
5
I was also able to reduce the likelihood of this occurring by disabling "auto-scanning of sources".
Once disabled, you can trigger this manually by right clicking the project folder and choosing "Refresh Folder".

Matt Mombrea
- 6,793
- 2
- 20
- 20
-
This was not a solution for me. It decreased the loading time, but it was not significant compared to the total compilation time. If you have the same problem as me (a lot of static imports in one of the classes - I had 8000 import.math) this will not help you. – Martynas Jonaitis Sep 23 '16 at 06:41