Cannot find java. Please use the --jdkhome switch
- Go to the netbeans installation directory
- Find configuration file [installation-directory]/etc/netbeans.conf
- towards the end find the line netbeans_jdkhome=...
- comment this line line using '#'
- now run netbeans. launcher will find jdk itself (from $JDK_HOME/$JAVA_HOME) environment variable
example:
sudo vim /usr/local/netbeans-8.2/etc/netbeans.conf
I do recommend you to change the configuration of JDK used by NetBeans in netbeans.conf
config file:
netbeans_jdkhome="C:\Program Files\Java\..."