Can't using Netbeans 10.0 after installing from repository on Ubuntu 18.04
Check that the java platform was correctly configured when you installed Netbeans.
In my case, during the installation process, there was a box for entering the path to the Java SDK, which defaulted to /usr (which is probably wrong). I failed to check that, and ended up having a wrongly configured JDK.
You can check this by going to Tools > Java Platforms in Netbeans. If the JDK platform says something like "Error: the specified folder does not contain a Java platform" then that's your problem.
In order to fix this you can either reinstall netbeans (and pick the correct path this time)
OR
Edit the config file (exit netbeans first), in my case:
nano ~/netbeans-11.2/netbeans/etc/netbeans.conf
find the line with netbeans_jdkhome= and edit the path. Example:
netbeans_jdkhome="/usr/lib/jvm/java-11-openjdk-amd64"
save the file, and start Netbeans. With luck, it should work now.