"Uncompilable source code" RuntimeException in netbeans

We finally got a solution, but still don't quite know why the situation occurs. When you have Compile On Save activated, Netbeans generates a second set of class files for debugging etc. These are stored in $USER/.netbeans/var/cache/index/s*/java/*/classes

Somehow (not sure how) this directory can get corrupted or fail to update.

If you close netbeans, delete $USER/.netbeans/var/cache/index and all subdirectories and restart netbeans this clears the cache. If you have no compile errors, your problem ought to go away at this point.

NB: $USER is your user directory - on Windows 7 this is usually c:\Users\username, I guess on Unix it will be ~username.

If you get this problem please vote for, comment on, or add information to: http://netbeans.org/bugzilla/show_bug.cgi?id=182009


I experienced the same wired problem in NB 7.0.1, my hammer-IQ solution was to make a typo in the source code, run NB with this error (despite an error message) and than the cached class was successfully deleted.

Tags:

Java

Netbeans