NetBeans background scanning projects takes too long

后端 未结 15 1387
-上瘾入骨i
-上瘾入骨i 2021-02-05 03:29

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 rei

15条回答
  •  [愿得一人]
    2021-02-05 03:40

    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.

提交回复
热议问题