NetBeans background scanning projects takes too long. Every time when I open netbeans it scanning for ages. I used NetBeans 7.2 and it works perfecly. Now I formatted pc and reinstalled windows, install the same version of NetBeans 7.2, and it works to slow.
-
During RnD your projects becomes messy sometimes. You try things. Before taking drastic actions like uninstall and reinstall, try to recollect: You didn't delete a directory with stuff you used for temp- write or read reasons in your project with Explorer or by terminal command? And you forgot you added that path also to the list of directories in project-properties. Check this first. – javanees May 13 '17 at 14:12
-
I've just installed Netbeans 12.5 in 2021 and I have exactly the same problem. – DavidHyogo Oct 18 '21 at 08:47
16 Answers
Having the same issue with 8.0.2 when a project has JS resources I tracked it down in my case to a problem with the javascript2 editor module which has been updated over the original version shipping with netbeans 8.0.2.
I simply solved it by removing the updated module.
On Linux:
rm ~/.netbeans/8.0.2/modules/org-netbeans-modules-javascript2-editor.jar
However, after letting the netbeans updater download the module a second time, the problem didn't appear again.
In Netbeans 8.1, the location of this file is at: ide/modules/org-netbeans-modules-javascript2-editor.jar.

- 152
- 1
- 7

- 640
- 7
- 11
-
1Same problem here since yesterday, but on Windows. Removing that jar helped in the sense that it didnt get stuck. I then traced the problem to a JS-file in my php project that had a multiline comment-block. Removing that solved the problem as wel for me. Strangely, when I create JS-file with multiline comment in Netbeans, this doesn't happen, when I add the multiline comment outside Netbeans, it happens. I will try and create a proper bug report for this. – qrazi Mar 10 '15 at 06:57
-
2For me that module was in `~/netbeans-8.0/ide/modules` and it works, after upgrade reinstalls it! How did you know? – NoBugs Mar 12 '15 at 03:19
-
I just looked at the thread stack of netbeans to see whats going on and found the class which may cause the problem – Martin Mar 17 '15 at 06:20
-
I have NetBeans 8.0.2 and I do NOT have a JavaScript module in ./modules/ at all. Still, my startup background scanning took over 40 minutes. It was apparently due to ~14,000 file changes/adds/deletes in a project that I mount over SSHFS. info at https://freephile.org/wiki/NetBeans – Greg Rundlett Mar 17 '16 at 16:48
I have the same problem in netbeans but i found solution by unselect the check from auto scan background in your netbeans IDE go to tools and then Option and select then to miscellaneous and select file tab inside miscellaneous and you will find check as "enable of auto-scanning of the source unselect that one and netbeans will be fast then i hope it will help you in fasting your IDE too

- 1,621
- 1
- 20
- 31

- 139
- 1
- 12
-
Good move, but unfortunately not enough. I would add the "unnecessary" directories to the "Ignored Folders" list in the project's "Properties". Netbeans states the following "Note: Code analysis ignores Ignored Folders automatically." I hope this help! – Braza Oct 17 '21 at 09:13
After latest update of Netbean 8.0.2 I have the same problem that scaning process did not stop and go forever with CPU usage on 25%.
When I replace javascrip editor files in C:\Program Files\NetBeans 8.0.2\ide\modules
on Windows 7 with old one then scaning project process start work again. You can take those file from this repo.

- 61
- 2
-
Problem seems solved with this issue, but now netbeans ask me to upgrade the Javascript2 Editor from version 0.44.3 to 0.44.4. I think that 0.44.4 is the buggy version, so we need to wait 0.44.5 or later, right? – g4b0 Mar 12 '15 at 08:03
-
You can try to update and see what hapened =) My netbean do not asked for any updates – uran1980 Mar 12 '15 at 10:06
-
Just tryed, it becomes unresponsive again! We need to wait the guys @NetBeans to solve it! – g4b0 Mar 12 '15 at 10:26
-
Now I check for latest update in my netbeans and take it. Have no problem with project scaning. – uran1980 Mar 12 '15 at 11:22
-
-
i'm facing the same issue, but it works fine after increase the heap size by adding -J-Xmx2048m
in <NETBEANS_DIR>\etc\netbeans.conf
mine looks like this:
netbeans_default_options="-J-client -J-Xss2m -J-Xms2048m -J-Xmx2048m -J-XX:PermSize=32m ......
-
That was curious. I've set my heap to 1200m and initially it didn't helpt at all. But after like 10 minutes it suddenly worked. Btw I've tried out uran1980's method, so I have his jars. – Rav Dec 17 '15 at 13:24
Try the following :
1) Go to Window-->Files. This opens the Files Tab.
2) In the Files Tab for each opened project open the nbproject folder and inside it open the project.properties file.
3) Now in this file below the property "excludes" there are file references listed for all your referred Libraries (JARs)
4) There might be some repeated file references with paths that may be old or on someone else's machine(if you are working in a group and transferred projects from someone's machine)
5) Delete those old path references.
Example -
excludes=
file.reference.xyz.jar=../not/correct/path.jar //delete this line
file.reference.xyz.jar-1=../correct/path.jar //remove -1
....
includes=**
6)Also locate the property "javac.classpath" and delete the unnecessary classpath entries corresponding to the deleted references as described above.
Example -
javac.classpath=\
${file.reference.xyz.jar}:\ //keep this line
${file.reference.xyz.jar-1}:\ //delete this line
....
javac.compilerargs=
7) So now the file reference mentioned in the file reference section and the javac.classpath property is same and points to a valid Library (JAR) address on your machine or network.
Example -
excludes=
file.reference.xyz.jar=../correct/path.jar //the correct reference & path
....
includes=**
....
javac.classpath=\
${file.reference.xyz.jar}:\ //the correct classpath entry for reference
....
javac.compilerargs=
....
The reason the above procedure worked (in my case) is because it prevents Netbeans from scanning unnecessary Library paths that may not be present on your machine/network.

- 164
- 4
-
Strategy that I used: "Tools"->"Options" excluded files that I suspected were the issue using the "Ignored Files Pattern" regex. Scanning completed. Then removed the exclusions from the regex one by one, files scanned normally. Also unclick "Enable auto-scanning". But my project is yuge, 270K+ lines. – davmor Apr 25 '16 at 13:30
-
Voted down because you can't get to the file menu because NetBeans is hanging... seriously – Wancieho Aug 15 '18 at 12:35
On Windows 10 64bit I had the same problem with Netbeans IDE 8.1 I restarted Netbeans as administrator and the problem was solved. Then I closed Netbeans and started normally and the problem was still gone.
Product Version: NetBeans IDE 8.1 (Build 201510222201)
Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows 10 version 10.0 running on amd64; Cp1252; nl_NL (nb)

- 519
- 10
- 27
-
Somehow this solution increased the performance on Netbeans 8.2 win 10. – Abdelsalam Shahlol May 21 '17 at 16:33
OS: Windows 7 x64.
The following worked for me:
I fully uninstalled Netbeans (ticked all boxes in uninstaller). For those who couldn't you'll need to go to C:\Users\%username%\AppData\Roaming\NetBeans\8.0.2
and delete a file called 'lock'. This is normally removed when the program exits but if you need to force terminate it'll remain there.
After that I uninstalled JDK and JRE then downloaded Java Platform (JDK) 8u40: http://www.oracle.com/technetwork/java/javase/downloads/index.html
And Netbeans 8.0.2: https://netbeans.org/downloads/
Installed JDK (which installs JRE too), after that Netbeans. Once complete I loaded up projects where background scanning got stuck and it seems to have fixed it. Will post updates if it starts happening again.
-
I did these mostly-same steps just 2 days ago (different JDK) - NB 8.0.2, JDK 7_79, Win 7 64 bit. (I must use Java 7 for the project, Java 8 not allowed) The background scanning of projects occurs over and over again throughout the day. It does not get stuck but it uses up CPU. I've disabled it in the Options but it still happens. – Iceberg May 14 '15 at 17:26
I actually made a bug report for this issue. It was fixed and pushed to the update channels yesterday. So for anyone still having this specific bug, let Netbeans check for updates. :)
Bugfix: https://netbeans.org/bugzilla/show_bug.cgi?id=250985

- 1,406
- 1
- 15
- 18
On Ubuntu 18.04 / Netbeans 10.0, I had the same problem.
- [FAIL] Deleted cache
- [FAIL] Deleted project-specific "nbproject" dir
- [FAIL] Closed the offending project (mouseover the progress bar to identify which one) --> restart NB --> create new project
- [SUCCESS] Nuked the project from the F/S --> re-cloned --> restarted NB. I also renamed the directory itself, in case there was some other cache that pointed to the old dirname.

- 1,690
- 1
- 12
- 18
Please try NetBeans 8.0.2 from https://netbeans.org/downloads/
NetBeans 7.2 is too old and you will not get any support anymore.

- 2,235
- 18
- 17
-
9I'm using 8.0.2 and the "background scanning of projects" has been going on for over an hour. Always at 100%. – paullb Mar 04 '15 at 08:19
-
I am using latest version too still this seems a common problem for all netbeans versions – Amit Mar 04 '15 at 09:04
-
3
-
1
-
3
-
Same here with NetBeans 8.0.2. After looking at ps output, and inspecting /etc/netbeans.conf, I located my messages.log file. By this time NetBeans actually finished scanning my projects. The scanning took over 40 minutes to inventory over 14,000 new/modified/deleted files over an SSHFS link. – Greg Rundlett Mar 17 '16 at 16:42
I was having the same problem with Netbeans 8.1, Windows 10. It was also hanging when I tried to compile and refactor. It would sometimes say 100% done yet continue background scanning for hours. I closed the project in which this was happening, and switched to a simple project and the problem went away. So I examined my code. I had class A extending class B, then class B importing class A. When I changed this, the endless looping in Ant stopped.
-
2Yes, it is specific to a single project, but could also be helpful to other users in that it was also "Every time when I open netbeans" because I typically leave the same set of projects up when I close the IDE, and the IDE therefore starts up with those projects open every time. If I opened it without any projects in place, I imagine it would not do any background scanning of projects. – Apr 13 '16 at 18:50
Always I fix such Netbeans related problems by deleting cache directory.
Directory location can be seen on About dialog window. For me, the path is
C:\Users\USER\AppData\Local\NetBeans\Cache\YOUR_VERSION

- 743
- 1
- 10
- 16
This problem is related to one of the project opened in your IDE. As I had been facing the same issue but, after spending two hours on that issue I finally fixed that. Close project one by one or check and close the project where background processing is taking time. After closing the project delete the .nbproject folder and re-import the same project into your IDE.

- 1,277
- 3
- 22
- 43
It should be called foreground scanning of projects. Closing the program and restarting solves it for me sometimes.

- 5
- 1
- 4
I had the same problem but in my case I was on Windows 10 and running NetBeans 8.1.
Before I formatted my laptop I copied and backed up C:\Users\user_name\AppData\Roaming\NetBeans\8.1 and C:\Users\user_name\AppData\Local\NetBeans\Cache folders
Then i followed the below steps:
- Install NetBeans and run it.
- Closed NetBeans
- Go to C:\Users\user_name\AppData\Roaming\NetBeans\8.1 and C:\Users\user_name\AppData\Local\NetBeans\Cache folders and replace them with the backed up folders.
- Run NetBeans again
I hope this solves your problem!!

- 1,191
- 11
- 19
In my Laravel case ,got this "forever scanning" because the project was created in another IDE. I put the old IDE related folders .idea
, vendor
, node_modules
into myproject->Properties->Ignored folders
. Relaunched NetBeans as admin. It will scan a little bit but next time wont stick on that.

- 3,672
- 2
- 41
- 29