NetBeans Quick Tip #18: What to Do when Things Go Wrong?
By Roman Strobl on I 04, 2006
It can happen that things go wrong. For instance, you install that very cool plug-in somebody has developed and oops, the IDE starts to do strange things. Or your hardrive capacity goes to zero because you're downloading latest DVD image of your favorite Linux distribution and oops, NetBeans has nowhere to write. Or you open many versions of JDK sources and your userdir starts to grow due to the cache.
What to do now? A typical reaction of a Windows user is to reinstall the application. Well, you can reinstall NetBeans for 1000 times but it won't help, simply because the corrupted or overgrown data is in your userdir. The userdir contains both your configuration, installed extra modules, caches and other application specific data, similarly as applications like Firefox do it.
Instead of reinstalling NetBeans shutdown the IDE, delete the userdir and re-run NetBeans. It will recreate the userdir. You need to choose the correct userdir according to your version (e.g. 4.1, 5.0 or dev for development version). Note that you may lose your configuration, so it pays of to backup the userdir just in case, but except for installed modules I can't think of other important data, other than it may take a while to reconfigure the IDE. If you want to delete just the cache (because parsing went crazy or became slower), delete only /var/cache.
Some people might think that sharing this kind of information is not good - basicly I'm admiting that things can go wrong. Well, this happens, no hardware or software is perfect, so my take is that if we can help our users recover from the issues, let's help them. Majority of them won't have to deal with this anyway, but it can help those who will have to.