My Netbeans installation on Ubuntu development machine stopped working few days ago. It just freezes.
After some research I found that problem is with some incompatibility between Netbeans and the openjdk installed on my machine.
Solution or workaround to this problem is to uninstall openJDK and replace it with Oracle JDK.
Here are step-by-step instructions how to do this: