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
I do recommend you to change the configuration of JDK used by NetBeans in netbeans.conf
config file:
netbeans_jdkhome="C:\Program Files\Java\..."
With the Netbeans 10, commenting out the netbeans_jdkhome
setting in .../etc/netbeans.conf
doesn't do the job anymore. It is necessary to specify the right directory depending of 32/64 bitness.
E.g. for 64 bit application: netbeans_jdkhome="C:\Program Files\AdoptOpenJDK\jdk8u202-b08"
Try Java SE Runtime Environment 8. It fixed it for me.
First, please remember that in a Mac computer the netbeans.conf file is stored at
/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
(if you had used the default installation package.)
Then, also remember that the directory you MUST use on either "netbeans_jdkhome" or "--jdkhome" it's NOT the /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/ but the following one:
/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home //<-- Please, notice the /Contents/Home at the end. That's the "trick"!
Note: of course, you must change the versions for both NetBeans and JDK you're using.