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)?
Asked
Active
Viewed 5,436 times
1
-
2In addition to your attempts, Try clearing the cache: http://stackoverflow.com/a/10722287/91362 – edwardsmatt Dec 16 '12 at 21:51
3 Answers
3
try rename the class. Sometime it is problem with renaming (lower/Upper cas).
Or move the class to another package. Jirka

user1722245
- 2,065
- 1
- 18
- 31
-
that worked for me. I couldn't get netbeans to rebuild. So, renaming worked great. – AdamOutler Apr 24 '13 at 00:51
1
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.

zurbergram
- 421
- 6
- 20
0
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!

P. Rick
- 3
- 4