I have just installed Netbeans 8.0.2 on CentOS 6.5.
When I try to run it, I get the message
Cannot find java. Please use the --jdkhome switch
example:
sudo vim /usr/local/netbeans-8.2/etc/netbeans.conf