I know it\'s installed because when I type:
$java -version
I get:
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.
I am using Ubuntu 18.04.1 LTS. In my case I had to open the file:
/home/[username]/netbeans-8.2/etc/netbeans.conf
And change the jdk location to:
netbeans_jdkhome="/opt/jdk/jdk1.8.0_152"
Then saved the file and re-run Netbeans. It worked for me.