zurbergram
zurbergram

Reputation: 429

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

Upvotes: 1

Views: 5782

Answers (3)

P. Rick
P. Rick

Reputation: 3

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!

Upvotes: 0

zurbergram
zurbergram

Reputation: 429

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.

Upvotes: 1

user1722245
user1722245

Reputation: 2173

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

Or move the class to another package. Jirka

Upvotes: 3

Related Questions