1

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)?

zurbergram
  • 421
  • 6
  • 20

3 Answers3

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
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