Fixing Netbeans after Ubuntu 9 upgrade

This morning I upgraded my Ubuntu machine using the auto-update. As I just recently started using Ubuntu I’m very pleased at how some features work compared to Vista. (Vista users will probably be familiar with the auto-update restart that has a terrific feel for timing by always presenting you the choice for postponing the restart when you have several documents opened and are away for a coffee break.) After my self initiated restart everything worked like a charm, OpenOffice is updated to version 3 (nice for the docx workflow) but… Netbeans didn’t start. Now that’s bad for productivity. Running from the console showed the following:

Cannot find java. Please use the --jdkhome switch.

a After a little bit of googling I learned there is a netbeans.conf somewhere. On my system it’s location is:


In there, look for a line like


and change the version number to the correct version. For me it worked like a charm, I hope it helps someone.