简体   繁体   中英

How to fix Netbeans 7.2.1 not build/compiling properly?

I have a class then when I edit and then build Netbeans doesn't recognize that I changed the code during runtime. When using debug mode it won't let me put break points at my new code and acts like the old code is still there. I have single compiled the class, used build for the whole project, used build and clean for the whole project, restarted netbeans, restarted the computer. Does anyone have a fix for this besides recreating the whole project (this is not reasonable as the project is quit large and is used by other projects)?

try rename the class. Sometime it is problem with renaming (lower/Upper cas).

Or move the class to another package. Jirka

The issue was the project(A) was added to the library of another project(B).
In the main project(Main) B was added to the library before A, so at run time since I had not rebuilt B it was using the old A code.

I fixed this by removing the reference for B from Main's library and removing the reference for A from B's library as those references are not needed for Main to run properly.

Renaming the classes worked for me. Netbeans did not understand he had to compile the one class too, then another. After a few renames (And back) it worked!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM